forked from pool/maven-archiver
Compare commits
15 Commits
76ce10cfe7
...
222e558299
Author | SHA256 | Date | |
---|---|---|---|
222e558299 | |||
c70c721c8a | |||
96ef36b74e | |||
7e89f97739 | |||
c1e74d0ce6 | |||
c557856d10 | |||
538c41b09a | |||
572996f018 | |||
bd22029283 | |||
60788bfa28 | |||
9dae7ed789 | |||
dd558e6183 | |||
1d190bcf17 | |||
efc18d5d44 | |||
73af195b70 |
@@ -1,53 +0,0 @@
|
||||
--- maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:17:38.831806826 +0200
|
||||
+++ maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:17:56.567532578 +0200
|
||||
@@ -597,7 +597,9 @@
|
||||
|
||||
String automaticModuleName = manifest.getMainSection().getAttributeValue("Automatic-Module-Name");
|
||||
if (automaticModuleName != null) {
|
||||
- if (!isValidModuleName(automaticModuleName)) {
|
||||
+ if (automaticModuleName.isEmpty()) {
|
||||
+ manifest.getMainSection().removeAttribute("Automatic-Module-Name");
|
||||
+ } else if (!isValidModuleName(automaticModuleName)) {
|
||||
throw new ManifestException("Invalid automatic module name: '" + automaticModuleName + "'");
|
||||
}
|
||||
}
|
||||
--- maven-archiver-3.6.3/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java 2025-07-21 12:17:38.832836603 +0200
|
||||
+++ maven-archiver-3.6.3/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java 2025-07-21 12:18:11.727320893 +0200
|
||||
@@ -563,9 +563,36 @@
|
||||
}
|
||||
|
||||
/*
|
||||
- * Test to make sure that manifest sections are present in the manifest prior to the archive has been created.
|
||||
+ * Test to make sure that empty Automatic-Module-Name will result in no
|
||||
+ * Automatic-Module-Name attribute at all, but that the archive will be created.
|
||||
*/
|
||||
@Test
|
||||
+ void testManifestWithEmptyAutomaticModuleName() throws Exception {
|
||||
+ File jarFile = new File("target/test/dummy.jar");
|
||||
+ JarArchiver jarArchiver = getCleanJarArchiver(jarFile);
|
||||
+
|
||||
+ MavenArchiver archiver = getMavenArchiver(jarArchiver);
|
||||
+
|
||||
+ Project project = getDummyProject();
|
||||
+ MavenArchiveConfiguration config = new MavenArchiveConfiguration();
|
||||
+
|
||||
+ Map<String, String> manifestEntries = new HashMap<>();
|
||||
+ manifestEntries.put("Automatic-Module-Name", "");
|
||||
+ config.setManifestEntries(manifestEntries);
|
||||
+
|
||||
+ archiver.createArchive(session, project, config);
|
||||
+ assertThat(jarFile).exists();
|
||||
+
|
||||
+ final Manifest jarFileManifest = getJarFileManifest(jarFile);
|
||||
+ Attributes manifest = jarFileManifest.getMainAttributes();
|
||||
+
|
||||
+ assertThat(manifest).doesNotContainKey(new Attributes.Name("Automatic-Module-Name"));
|
||||
+ }
|
||||
+
|
||||
+ //
|
||||
+ // Test to make sure that manifest sections are present in the manifest prior to the archive has been created.
|
||||
+ //
|
||||
+ @Test
|
||||
void testManifestSections() throws Exception {
|
||||
MavenArchiver archiver = new MavenArchiver();
|
||||
|
BIN
maven-archiver-3.6.3-source-release.zip
(Stored with Git LFS)
BIN
maven-archiver-3.6.3-source-release.zip
(Stored with Git LFS)
Binary file not shown.
3
maven-archiver-3.6.4-source-release.zip
Normal file
3
maven-archiver-3.6.4-source-release.zip
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:13d00449ed9d8793d1ac372243c41b2fc5f97c0e66e46a3fa4c9743e4fd098f1
|
||||
size 134684
|
@@ -10,7 +10,7 @@
|
||||
|
||||
<property name="project.groupId" value="org.apache.maven"/>
|
||||
<property name="project.artifactId" value="maven-archiver"/>
|
||||
<property name="project.version" value="3.6.3"/>
|
||||
<property name="project.version" value="3.6.4"/>
|
||||
<property name="project.name" value="Apache Maven Archiver"/>
|
||||
<property name="project.organization.name" value="The Apache Software Foundation"/>
|
||||
|
||||
|
@@ -1,3 +1,52 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 11 07:33:16 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Upgrade to maven-archiver 3.6.4
|
||||
* New features and improvements
|
||||
+ improve Reproducible Builds javadoc
|
||||
+ Fall back on SOURCE_DATE_EPOCH if it exists
|
||||
* Bug Fixes
|
||||
+ Treat empty Automatic-Module-Name as no Automatic-Module-Name
|
||||
at all
|
||||
* Maintenance
|
||||
+ Enable GitHub Issues
|
||||
* Dependency updates
|
||||
+ Bump org.apache.maven.shared:maven-shared-components
|
||||
from 43 to 45
|
||||
+ Bump org.codehaus.plexus:plexus-interpolation
|
||||
from 1.27 to 1.28
|
||||
+ Bump org.assertj:assertj-core from 3.26.0 to 3.27.3
|
||||
- Removed patches:
|
||||
* automatic-module-name.patch
|
||||
* reproducible-from-environment.patch
|
||||
+ integrated in this version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 25 07:15:18 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Modified patch:
|
||||
* reproducible-from-environment.patch
|
||||
+ rediff to include a follow-up PR
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 24 09:24:28 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Modified patch:
|
||||
* automatic-module-name.patch
|
||||
* reproducible-from-environment.patch
|
||||
+ rediff with our accepted pull requests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 21 10:30:59 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Modified patch:
|
||||
* automatic-module-name.patch
|
||||
+ rebase and add unit test
|
||||
- Added patch:
|
||||
* reproducible-from-environment.patch
|
||||
+ if the outputTimestamp variable is not specified, use the
|
||||
environmental varialble SOURCE_DATE_EPOCH if it is set.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 6 14:33:31 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package maven-archiver
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
%bcond_with tests
|
||||
Name: maven-archiver
|
||||
Version: 3.6.3
|
||||
Version: 3.6.4
|
||||
Release: 0
|
||||
Summary: Maven Archiver
|
||||
License: Apache-2.0
|
||||
@@ -26,8 +26,6 @@ Group: Development/Libraries/Java
|
||||
URL: https://maven.apache.org/shared/maven-archiver/
|
||||
Source0: https://repo1.maven.org/maven2/org/apache/maven/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||
Source1: %{name}-build.xml
|
||||
Patch0: automatic-module-name.patch
|
||||
Patch1: reproducible-from-environment.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: javapackages-local
|
||||
@@ -54,8 +52,6 @@ Javadoc for %{name}.
|
||||
%prep
|
||||
%setup -q
|
||||
cp %{SOURCE1} build.xml
|
||||
%patch -P 0 -p1
|
||||
%patch -P 1 -p1
|
||||
|
||||
%pom_xpath_remove pom:project/pom:parent/pom:relativePath
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
--- maven-archiver-3.6.3/pom.xml 2025-07-21 12:15:02.217924139 +0200
|
||||
+++ maven-archiver-3.6.3/pom.xml 2025-07-21 12:16:28.230551125 +0200
|
||||
@@ -115,4 +115,22 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
+
|
||||
+ <build>
|
||||
+ <pluginManagement>
|
||||
+ <plugins>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-surefire-plugin</artifactId>
|
||||
+ <configuration>
|
||||
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||
+ <excludedEnvironmentVariables>
|
||||
+ <excludedEnvironmentVariable>SOURCE_DATE_EPOCH</excludedEnvironmentVariable>
|
||||
+ </excludedEnvironmentVariables>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ </plugins>
|
||||
+ </pluginManagement>
|
||||
+ </build>
|
||||
+
|
||||
</project>
|
||||
--- maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:15:02.214537980 +0200
|
||||
+++ maven-archiver-3.6.3/src/main/java/org/apache/maven/archiver/MavenArchiver.java 2025-07-21 12:16:38.230572982 +0200
|
||||
@@ -753,9 +753,15 @@
|
||||
* section 4.4.6.
|
||||
*/
|
||||
public static Optional<Instant> parseBuildOutputTimestamp(String outputTimestamp) {
|
||||
- // Fail-fast on nulls
|
||||
- if (outputTimestamp == null) {
|
||||
+ final String sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ // Fail fast on null and no timestamp configured (1 character configuration is useful to override
|
||||
+ // a full value during pom inheritance)
|
||||
+ if (outputTimestamp == null || (outputTimestamp.length() < 2 && !isNumeric(outputTimestamp))) {
|
||||
+ if (sourceDateEpoch == null) {
|
||||
return Optional.empty();
|
||||
+ } else {
|
||||
+ outputTimestamp = sourceDateEpoch;
|
||||
+ }
|
||||
}
|
||||
|
||||
// Number representing seconds since the epoch
|
||||
@@ -769,12 +775,6 @@
|
||||
return Optional.of(date);
|
||||
}
|
||||
|
||||
- // no timestamp configured (1 character configuration is useful to override a full value during pom
|
||||
- // inheritance)
|
||||
- if (outputTimestamp.length() < 2) {
|
||||
- return Optional.empty();
|
||||
- }
|
||||
-
|
||||
try {
|
||||
// Parse the date in UTC such as '2011-12-03T10:15:30Z' or with an offset '2019-10-05T20:37:42+06:00'.
|
||||
final Instant date = OffsetDateTime.parse(outputTimestamp)
|
Reference in New Issue
Block a user