6
0

Compare commits

...

15 Commits

Author SHA256 Message Date
222e558299 Accepting request 1298749 from Java:packages
3.6.4

OBS-URL: https://build.opensuse.org/request/show/1298749
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=10
2025-08-11 11:54:01 +00:00
c70c721c8a OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-archiver?expand=0&rev=29 2025-08-11 08:19:48 +00:00
96ef36b74e OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-archiver?expand=0&rev=28 2025-08-11 07:39:44 +00:00
7e89f97739 Accepting request 1295692 from Java:packages
small tiny change again

OBS-URL: https://build.opensuse.org/request/show/1295692
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=9
2025-07-25 15:06:14 +00:00
c1e74d0ce6 OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-archiver?expand=0&rev=26 2025-07-25 07:16:02 +00:00
c557856d10 OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-archiver?expand=0&rev=25 2025-07-25 07:15:06 +00:00
538c41b09a Accepting request 1295480 from Java:packages
rebase patches to accepted pull request

OBS-URL: https://build.opensuse.org/request/show/1295480
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=8
2025-07-24 16:47:20 +00:00
572996f018 OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-archiver?expand=0&rev=23 2025-07-24 09:25:23 +00:00
bd22029283 Accepting request 1294787 from Java:packages
Some reproducible changes

OBS-URL: https://build.opensuse.org/request/show/1294787
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=7
2025-07-22 10:54:16 +00:00
60788bfa28 OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-archiver?expand=0&rev=21 2025-07-21 10:32:50 +00:00
9dae7ed789 Accepting request 1283730 from Java:packages
Fix exception with empty Automatic-Module-Name

OBS-URL: https://build.opensuse.org/request/show/1283730
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=6
2025-06-10 07:03:21 +00:00
dd558e6183 Accepting request 1219155 from Java:packages
3.6.3

OBS-URL: https://build.opensuse.org/request/show/1219155
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=5
2024-10-30 16:35:10 +00:00
1d190bcf17 Accepting request 1109287 from Java:packages
3.6.1

OBS-URL: https://build.opensuse.org/request/show/1109287
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=4
2023-09-06 17:00:08 +00:00
efc18d5d44 Accepting request 963334 from Java:packages
Build with source/target levels 8

OBS-URL: https://build.opensuse.org/request/show/963334
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=3
2022-03-21 19:11:02 +00:00
73af195b70 Accepting request 750558 from Java:packages
3.5.0

OBS-URL: https://build.opensuse.org/request/show/750558
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-archiver?expand=0&rev=2
2019-11-26 15:58:00 +00:00
7 changed files with 55 additions and 121 deletions

View File

@@ -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)

Binary file not shown.

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:13d00449ed9d8793d1ac372243c41b2fc5f97c0e66e46a3fa4c9743e4fd098f1
size 134684

View File

@@ -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"/>

View File

@@ -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>

View File

@@ -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

View File

@@ -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)