Accepting request 1241596 from Java:packages

Upgrade to 2.5.3

OBS-URL: https://build.opensuse.org/request/show/1241596
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-ivy?expand=0&rev=27
This commit is contained in:
Ana Guerrero 2025-02-03 20:40:36 +00:00 committed by Git OBS Bridge
commit 90f96f8773
8 changed files with 455 additions and 437 deletions

BIN
apache-ivy-2.5.2-src.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
apache-ivy-2.5.3-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,11 +1,11 @@
--- a/src/java/org/apache/ivy/ant/IvyAntSettings.java
+++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java
@@ -345,7 +345,7 @@ public class IvyAntSettings extends DataType {
File[] settingsLocations = new File[] {
new File(getProject().getBaseDir(), settingsFileName),
new File(getProject().getBaseDir(), "ivyconf.xml"), new File(settingsFileName),
- new File("ivyconf.xml")};
+ new File("ivyconf.xml"), new File("/etc/ivy/ivysettings.xml")};
for (File settingsFile : settingsLocations) {
task.log("searching settings file: trying " + settingsFile, Project.MSG_VERBOSE);
if (settingsFile.exists()) {
@@ -345,7 +345,7 @@ public class IvyAntSettings extends Data
File[] settingsLocations = new File[] {
new File(getProject().getBaseDir(), settingsFileName),
new File(getProject().getBaseDir(), "ivyconf.xml"), new File(settingsFileName),
- new File("ivyconf.xml")};
+ new File("ivyconf.xml"), new File("/etc/ivy/ivysettings.xml")};
for (File settingsFile : settingsLocations) {
task.log("searching settings file: trying " + settingsFile, Project.MSG_VERBOSE);
if (settingsFile.exists()) {

View File

@ -1,21 +1,21 @@
--- apache-ivy-2.5.2/build.xml 2023-10-30 16:09:23.892302634 +0100
+++ apache-ivy-2.5.2/build.xml 2023-10-30 16:12:01.143389848 +0100
--- a/build.xml
+++ b/build.xml
@@ -185,6 +185,7 @@
<javac srcdir="${src.dir}"
destdir="${core.classes.build.dir}"
sourcepath=""
+ classpathref="lib.classpath"
source="${ivy.minimum.javaversion}"
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
--- apache-ivy-2.5.2/src/java/org/apache/ivy/util/FileUtil.java 2023-10-30 16:09:23.928969555 +0100
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/util/FileUtil.java 2023-10-30 16:13:35.547375897 +0100
@@ -46,7 +46,7 @@
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipInputStream;
-import static java.util.jar.Pack200.newUnpacker;
+import static io.pack200.Pack200.newUnpacker;
/**
* Utility class used to deal with file related operations, like copy, full reading, symlink, ...
<javac srcdir="${src.dir}"
destdir="${core.classes.build.dir}"
sourcepath=""
+ classpathref="lib.classpath"
source="${ivy.minimum.javaversion}"
target="${ivy.minimum.javaversion}"
debug="${debug.mode}"
--- a/src/java/org/apache/ivy/util/FileUtil.java
+++ b/src/java/org/apache/ivy/util/FileUtil.java
@@ -46,7 +46,7 @@ import java.util.jar.JarOutputStream;
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipInputStream;
-import static java.util.jar.Pack200.newUnpacker;
+import static io.pack200.Pack200.newUnpacker;
/**
* Utility class used to deal with file related operations, like copy, full reading, symlink, ...

View File

@ -1,192 +1,192 @@
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java 2023-09-19 08:19:56.002999512 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java 2023-09-19 09:00:48.163799846 +0200
@@ -197,7 +197,7 @@
throw new RuntimeException("Unsupported file path : " + artifactFile, e);
}
- res.add(new DefaultArtifact(md.getModuleRevisionId(), new Date(), name, type, ext,
+ res.add(new DefaultArtifact(md.getModuleRevisionId(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), name, type, ext,
url, null));
}
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyDeliver.java 2023-09-19 08:19:56.002999512 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyDeliver.java 2023-09-19 09:01:57.027624096 +0200
@@ -374,7 +374,7 @@
if (revision == null) {
revision = Ivy.getWorkingRevision();
}
- Date pubdate = getPubDate(this.pubdate, new Date());
+ Date pubdate = getPubDate(this.pubdate, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
if (pubRevision == null) {
if (revision.startsWith("working@")) {
pubRevision = DateUtil.format(pubdate);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyPublish.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyPublish.java 2023-09-19 09:02:18.827779503 +0200
@@ -273,7 +273,7 @@
if ("working".equals(revision)) {
revision = Ivy.getWorkingRevision();
}
- Date pubdate = getPubDate(this.pubdate, new Date());
+ Date pubdate = getPubDate(this.pubdate, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
if (pubRevision == null) {
if (revision.startsWith("working@")) {
pubRevision = DateUtil.format(pubdate);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyTask.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/ant/IvyTask.java 2023-09-19 09:01:36.900813938 +0200
@@ -177,7 +177,7 @@
return def;
}
if ("now".equals(date.toLowerCase(Locale.US))) {
- return new Date();
+ return System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
}
try {
return DateUtil.parse(date);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java 2023-09-19 08:20:15.856475360 +0200
@@ -1472,7 +1472,7 @@
}
private Artifact getDefaultMetadataArtifact(ModuleRevisionId mrid) {
- return new DefaultArtifact(mrid, new Date(), "metadata", "metadata", "ivy", true);
+ return new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), "metadata", "metadata", "ivy", true);
}
// not used any more, but may be useful for finer grained locking when downloading artifacts
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/deliver/DeliverOptions.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/deliver/DeliverOptions.java 2023-09-19 09:02:47.901319704 +0200
@@ -61,7 +61,7 @@
* @return a DeliverOptions instance ready to be used or customized
*/
public static DeliverOptions newInstance(IvySettings settings) {
- return new DeliverOptions(null, new Date(), new DefaultPublishingDRResolver(),
+ return new DeliverOptions(null, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), new DefaultPublishingDRResolver(),
settings.doValidate(), true, null);
}
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/install/InstallEngine.java 2023-09-19 08:19:56.006332869 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/install/InstallEngine.java 2023-09-19 09:04:45.372153072 +0200
@@ -86,7 +86,7 @@
DefaultModuleDescriptor md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance(
"apache", "ivy-install", "1.0"), settings.getStatusManager().getDefaultStatus(),
- new Date());
+ System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
String resolveId = ResolveOptions.getDefaultResolveId(md);
md.addConfiguration(new Configuration("default"));
md.addConflictManager(new ModuleId(ExactPatternMatcher.ANY_EXPRESSION,
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultArtifact.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultArtifact.java 2023-09-19 08:20:27.823227936 +0200
@@ -100,7 +100,7 @@
throw new NullPointerException("null arid not allowed");
}
if (publicationDate == null) {
- publicationDate = new Date();
+ publicationDate = System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
}
this.publicationDate = publicationDate;
this.arid = arid;
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java 2023-09-19 08:21:12.330214087 +0200
@@ -272,7 +272,7 @@
this.resolvedRevId = id;
this.status = status;
this.publicationDate = pubDate;
- this.resolvedPublicationDate = publicationDate == null ? new Date() : publicationDate;
+ this.resolvedPublicationDate = publicationDate == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()) : publicationDate;
this.isDefault = isDefault;
this.parser = XmlModuleDescriptorParser.getInstance();
}
@@ -308,7 +308,7 @@
public void setPublicationDate(Date publicationDate) {
this.publicationDate = publicationDate;
if (resolvedPublicationDate == null) {
- resolvedPublicationDate = publicationDate == null ? new Date() : publicationDate;
+ resolvedPublicationDate = publicationDate == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()) : publicationDate;
}
}
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/publish/PublishEngine.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/publish/PublishEngine.java 2023-09-19 09:03:21.054888232 +0200
@@ -102,7 +102,7 @@
ModuleDescriptor md = null;
if (options.getSrcIvyPattern() != null) {
File ivyFile = settings.resolveFile(IvyPatternHelper.substitute(
- options.getSrcIvyPattern(), DefaultArtifact.newIvyArtifact(pubmrid, new Date())));
+ options.getSrcIvyPattern(), DefaultArtifact.newIvyArtifact(pubmrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date())));
if (!ivyFile.exists()) {
throw new IllegalArgumentException("ivy file to publish not found for " + mrid
+ ": call deliver before (" + ivyFile + ")");
@@ -132,7 +132,7 @@
: options.getStatus())
.setRevision(options.getPubrevision())
.setBranch(options.getPubBranch())
- .setPubdate(options.getPubdate() == null ? new Date()
+ .setPubdate(options.getPubdate() == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date())
: options.getPubdate())
.setMerge(options.isMerge())
.setMergedDescriptor(md)
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/report/ResolveReport.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/report/ResolveReport.java 2023-09-19 09:04:29.478706979 +0200
@@ -360,7 +360,7 @@
public ModuleDescriptor toFixedModuleDescriptor(IvySettings settings, List<ModuleId> midToKeep) {
DefaultModuleDescriptor fixedmd = new DefaultModuleDescriptor(md.getModuleRevisionId(),
- md.getStatus(), new Date());
+ md.getStatus(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
// copy namespaces
for (Map.Entry<String, String> ns : md.getExtraAttributesNamespaces().entrySet()) {
--- apache-ivy-2.5.2/src/java/org/apache/ivy/core/resolve/ResolveEngine.java 2023-09-19 08:19:56.009666226 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/core/resolve/ResolveEngine.java 2023-09-19 09:04:13.531927183 +0200
@@ -572,7 +572,7 @@
try {
options.setConfs(confs);
- Date reportDate = new Date();
+ Date reportDate = System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
ResolveData data = context.getResolveData();
if (data == null) {
data = new ResolveData(this, options);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java 2023-09-19 08:19:56.012999584 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java 2023-09-19 09:06:16.799468326 +0200
@@ -93,7 +93,7 @@
md.addExtraAttributeNamespace("o", Ivy.getIvyHomeURL() + "osgi");
ModuleRevisionId mrid = asMrid(BundleInfo.BUNDLE_TYPE, bundle.getSymbolicName(),
bundle.getVersion());
- md.setResolvedPublicationDate(new Date());
+ md.setResolvedPublicationDate(System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
md.setModuleRevisionId(mrid);
md.addConfiguration(CONF_DEFAULT);
--- apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java 2023-09-19 08:19:56.012999584 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java 2023-09-19 09:06:27.589544872 +0200
@@ -201,7 +201,7 @@
Collections.singletonMap(CAPABILITY_EXTRA_ATTR, md.getModuleRevisionId().toString()));
DefaultModuleDescriptor capabilityMd = new DefaultModuleDescriptor(capabilityRev,
- getSettings().getStatusManager().getDefaultStatus(), new Date());
+ getSettings().getStatusManager().getDefaultStatus(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
String useConf = BundleInfoAdapter.CONF_USE_PREFIX + dd.getDependencyRevisionId().getName();
--- apache-ivy-2.5.2/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java 2023-09-19 08:19:56.016332941 +0200
+++ apache-ivy-2.5.2/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java 2023-09-19 09:05:45.949249470 +0200
@@ -249,7 +249,7 @@
DependencyResolver resolver = parserSettings.getResolver(mrid);
if (resolver != null) {
- DefaultArtifact artifact = new DefaultArtifact(mrid, new Date(), artifactId, "jar",
+ DefaultArtifact artifact = new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), artifactId, "jar",
"jar");
ArtifactOrigin artifactOrigin = resolver.locate(artifact);
@@ -268,7 +268,7 @@
ext = packaging;
}
- mainArtifact = new DefaultArtifact(mrid, new Date(), artifactId, packaging, ext);
+ mainArtifact = new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), artifactId, packaging, ext);
ivyModuleDescriptor.addArtifact("master", mainArtifact);
}
--- a/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
+++ b/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
@@ -197,7 +197,7 @@ public class AntWorkspaceResolver extend
throw new RuntimeException("Unsupported file path : " + artifactFile, e);
}
- res.add(new DefaultArtifact(md.getModuleRevisionId(), new Date(), name, type, ext,
+ res.add(new DefaultArtifact(md.getModuleRevisionId(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), name, type, ext,
url, null));
}
--- a/src/java/org/apache/ivy/ant/IvyDeliver.java
+++ b/src/java/org/apache/ivy/ant/IvyDeliver.java
@@ -374,7 +374,7 @@ public class IvyDeliver extends IvyTask
if (revision == null) {
revision = Ivy.getWorkingRevision();
}
- Date pubdate = getPubDate(this.pubdate, new Date());
+ Date pubdate = getPubDate(this.pubdate, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
if (pubRevision == null) {
if (revision.startsWith("working@")) {
pubRevision = DateUtil.format(pubdate);
--- a/src/java/org/apache/ivy/ant/IvyPublish.java
+++ b/src/java/org/apache/ivy/ant/IvyPublish.java
@@ -273,7 +273,7 @@ public class IvyPublish extends IvyTask
if ("working".equals(revision)) {
revision = Ivy.getWorkingRevision();
}
- Date pubdate = getPubDate(this.pubdate, new Date());
+ Date pubdate = getPubDate(this.pubdate, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
if (pubRevision == null) {
if (revision.startsWith("working@")) {
pubRevision = DateUtil.format(pubdate);
--- a/src/java/org/apache/ivy/ant/IvyTask.java
+++ b/src/java/org/apache/ivy/ant/IvyTask.java
@@ -177,7 +177,7 @@ public abstract class IvyTask extends Ta
return def;
}
if ("now".equals(date.toLowerCase(Locale.US))) {
- return new Date();
+ return System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
}
try {
return DateUtil.parse(date);
--- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
@@ -1472,7 +1472,7 @@ public class DefaultRepositoryCacheManag
}
private Artifact getDefaultMetadataArtifact(ModuleRevisionId mrid) {
- return new DefaultArtifact(mrid, new Date(), "metadata", "metadata", "ivy", true);
+ return new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), "metadata", "metadata", "ivy", true);
}
// not used any more, but may be useful for finer grained locking when downloading artifacts
--- a/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverOptions.java
@@ -61,7 +61,7 @@ public class DeliverOptions {
* @return a DeliverOptions instance ready to be used or customized
*/
public static DeliverOptions newInstance(IvySettings settings) {
- return new DeliverOptions(null, new Date(), new DefaultPublishingDRResolver(),
+ return new DeliverOptions(null, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), new DefaultPublishingDRResolver(),
settings.doValidate(), true, null);
}
--- a/src/java/org/apache/ivy/core/install/InstallEngine.java
+++ b/src/java/org/apache/ivy/core/install/InstallEngine.java
@@ -86,7 +86,7 @@ public class InstallEngine {
DefaultModuleDescriptor md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance(
"apache", "ivy-install", "1.0"), settings.getStatusManager().getDefaultStatus(),
- new Date());
+ System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
String resolveId = ResolveOptions.getDefaultResolveId(md);
md.addConfiguration(new Configuration("default"));
md.addConflictManager(new ModuleId(ExactPatternMatcher.ANY_EXPRESSION,
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultArtifact.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultArtifact.java
@@ -100,7 +100,7 @@ public class DefaultArtifact extends Abs
throw new NullPointerException("null arid not allowed");
}
if (publicationDate == null) {
- publicationDate = new Date();
+ publicationDate = System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
}
this.publicationDate = publicationDate;
this.arid = arid;
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
@@ -272,7 +272,7 @@ public class DefaultModuleDescriptor imp
this.resolvedRevId = id;
this.status = status;
this.publicationDate = pubDate;
- this.resolvedPublicationDate = publicationDate == null ? new Date() : publicationDate;
+ this.resolvedPublicationDate = publicationDate == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()) : publicationDate;
this.isDefault = isDefault;
this.parser = XmlModuleDescriptorParser.getInstance();
}
@@ -308,7 +308,7 @@ public class DefaultModuleDescriptor imp
public void setPublicationDate(Date publicationDate) {
this.publicationDate = publicationDate;
if (resolvedPublicationDate == null) {
- resolvedPublicationDate = publicationDate == null ? new Date() : publicationDate;
+ resolvedPublicationDate = publicationDate == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()) : publicationDate;
}
}
--- a/src/java/org/apache/ivy/core/publish/PublishEngine.java
+++ b/src/java/org/apache/ivy/core/publish/PublishEngine.java
@@ -102,7 +102,7 @@ public class PublishEngine {
ModuleDescriptor md = null;
if (options.getSrcIvyPattern() != null) {
File ivyFile = settings.resolveFile(IvyPatternHelper.substitute(
- options.getSrcIvyPattern(), DefaultArtifact.newIvyArtifact(pubmrid, new Date())));
+ options.getSrcIvyPattern(), DefaultArtifact.newIvyArtifact(pubmrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date())));
if (!ivyFile.exists()) {
throw new IllegalArgumentException("ivy file to publish not found for " + mrid
+ ": call deliver before (" + ivyFile + ")");
@@ -132,7 +132,7 @@ public class PublishEngine {
: options.getStatus())
.setRevision(options.getPubrevision())
.setBranch(options.getPubBranch())
- .setPubdate(options.getPubdate() == null ? new Date()
+ .setPubdate(options.getPubdate() == null ? (System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date())
: options.getPubdate())
.setMerge(options.isMerge())
.setMergedDescriptor(md)
--- a/src/java/org/apache/ivy/core/report/ResolveReport.java
+++ b/src/java/org/apache/ivy/core/report/ResolveReport.java
@@ -360,7 +360,7 @@ public class ResolveReport {
public ModuleDescriptor toFixedModuleDescriptor(IvySettings settings, List<ModuleId> midToKeep) {
DefaultModuleDescriptor fixedmd = new DefaultModuleDescriptor(md.getModuleRevisionId(),
- md.getStatus(), new Date());
+ md.getStatus(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
// copy namespaces
for (Map.Entry<String, String> ns : md.getExtraAttributesNamespaces().entrySet()) {
--- a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
@@ -572,7 +572,7 @@ public class ResolveEngine {
try {
options.setConfs(confs);
- Date reportDate = new Date();
+ Date reportDate = System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date();
ResolveData data = context.getResolveData();
if (data == null) {
data = new ResolveData(this, options);
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -93,7 +93,7 @@ public class BundleInfoAdapter {
md.addExtraAttributeNamespace("o", Ivy.getIvyHomeURL() + "osgi");
ModuleRevisionId mrid = asMrid(BundleInfo.BUNDLE_TYPE, bundle.getSymbolicName(),
bundle.getVersion());
- md.setResolvedPublicationDate(new Date());
+ md.setResolvedPublicationDate(System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
md.setModuleRevisionId(mrid);
md.addConfiguration(CONF_DEFAULT);
--- a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
+++ b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
@@ -201,7 +201,7 @@ public abstract class AbstractOSGiResolv
Collections.singletonMap(CAPABILITY_EXTRA_ATTR, md.getModuleRevisionId().toString()));
DefaultModuleDescriptor capabilityMd = new DefaultModuleDescriptor(capabilityRev,
- getSettings().getStatusManager().getDefaultStatus(), new Date());
+ getSettings().getStatusManager().getDefaultStatus(), System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date());
String useConf = BundleInfoAdapter.CONF_USE_PREFIX + dd.getDependencyRevisionId().getName();
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
@@ -249,7 +249,7 @@ public class PomModuleDescriptorBuilder
DependencyResolver resolver = parserSettings.getResolver(mrid);
if (resolver != null) {
- DefaultArtifact artifact = new DefaultArtifact(mrid, new Date(), artifactId, "jar",
+ DefaultArtifact artifact = new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), artifactId, "jar",
"jar");
ArtifactOrigin artifactOrigin = resolver.locate(artifact);
@@ -268,7 +268,7 @@ public class PomModuleDescriptorBuilder
ext = packaging;
}
- mainArtifact = new DefaultArtifact(mrid, new Date(), artifactId, packaging, ext);
+ mainArtifact = new DefaultArtifact(mrid, System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date(), artifactId, packaging, ext);
ivyModuleDescriptor.addArtifact("master", mainArtifact);
}

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Thu Jan 30 12:51:50 UTC 2025 - Gus Kenion <gus.kenion@suse.com>
- Upgrade to version 2.5.3
* Bugfixes:
+ trying to set safe XML features causes SAXExceptions when
used with certain XML parsers (jira:IVY-1647[])
+ some unit tests failed on Java 8 (jira:IVY-1648[])
+ cached Ivy files were not valid in some scenarios
(jira:IVY-1649[], jira:IVY-1650[])
* Documentation:
+ improved to the documentation regarding the use of patterns
in the resolvers and retrieve task (jira:IVY-1651[])
- Update patch files for compatibility with 2.5.3:
* apache-ivy-global-settings.patch
* apache-ivy-publication-date.patch
* apache-ivy-pack200.patch
-------------------------------------------------------------------
Sun Sep 29 19:45:07 UTC 2024 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package apache-ivy
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -22,7 +22,7 @@
%bcond_without vfs
%bcond_with pack200
Name: apache-ivy
Version: 2.5.2
Version: 2.5.3
Release: 0
Summary: Java-based dependency manager
License: Apache-2.0

View File

@ -1,211 +1,211 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>7</version>
</parent>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.2</version>
<name>Apache Ivy</name>
<url>http://ant.apache.org/ivy/</url>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/ant/ivy/core/trunk/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/ant/ivy/core/trunk</developerConnection>
<url>https://svn.apache.org/repos/asf/ant/ivy/core/trunk</url>
</scm>
<mailingLists>
<mailingList>
<name>Ant/Ivy Developers List</name>
<subscribe>dev-subscribe@ant.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@ant.apache.org</unsubscribe>
<post>dev@ant.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/ant-dev</archive>
</mailingList>
<mailingList>
<name>Ivy Users List</name>
<subscribe>ivy-user-subscribe@ant.apache.org</subscribe>
<unsubscribe>ivy-user-unsubscribe@ant.apache.org</unsubscribe>
<post>ivy-user@ant.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/ant-ivy-user</archive>
</mailingList>
</mailingLists>
<issueManagement>
<system>jira</system>
<url>https://issues.apache.org/jira/browse/IVY</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.16</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<version>2.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.connector-factory</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.jsch</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<version>1.70</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-testutil</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-launcher</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit4</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>7</version>
</parent>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.3</version>
<name>Apache Ivy</name>
<url>http://ant.apache.org/ivy/</url>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/ant/ivy/core/trunk/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/ant/ivy/core/trunk</developerConnection>
<url>https://svn.apache.org/repos/asf/ant/ivy/core/trunk</url>
</scm>
<mailingLists>
<mailingList>
<name>Ant/Ivy Developers List</name>
<subscribe>dev-subscribe@ant.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@ant.apache.org</unsubscribe>
<post>dev@ant.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/ant-dev</archive>
</mailingList>
<mailingList>
<name>Ivy Users List</name>
<subscribe>ivy-user-subscribe@ant.apache.org</subscribe>
<unsubscribe>ivy-user-unsubscribe@ant.apache.org</unsubscribe>
<post>ivy-user@ant.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/ant-ivy-user</archive>
</mailingList>
</mailingLists>
<issueManagement>
<system>jira</system>
<url>https://issues.apache.org/jira/browse/IVY</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.16</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<version>2.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.connector-factory</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch.agentproxy.jsch</artifactId>
<version>0.0.9</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<version>1.70</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-testutil</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-launcher</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit4</artifactId>
<version>1.9.16</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>