3 Commits

3 changed files with 21 additions and 8 deletions

View File

@@ -1,10 +1,3 @@
-------------------------------------------------------------------
Mon Jul 21 14:40:41 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Removed patch:
* reproducible-from-environment.patch
+ patched in a more central place in maven-archiver
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 24 09:38:55 UTC 2024 - Fridrich Strba <fstrba@suse.com> Tue Sep 24 09:38:55 UTC 2024 - Fridrich Strba <fstrba@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package maven-source-plugin # spec file for package maven-source-plugin
# #
# Copyright (c) 2025 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,7 @@ License: Apache-2.0
Group: Development/Libraries/Java Group: Development/Libraries/Java
URL: https://maven.apache.org/plugins/maven-source-plugin/ URL: https://maven.apache.org/plugins/maven-source-plugin/
Source0: https://repo1.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip Source0: https://repo1.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
Patch0: reproducible-from-environment.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: java-devel >= 1.8 BuildRequires: java-devel >= 1.8
BuildRequires: maven-local BuildRequires: maven-local
@@ -53,6 +54,7 @@ API documentation for %{name}.
%prep %prep
%setup -q %setup -q
%patch -P 0 -p1
%{mvn_file} : %{name} %{mvn_file} : %{name}

View File

@@ -0,0 +1,18 @@
diff -urEbwB maven-source-plugin-3.3.1.orig/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java maven-source-plugin-3.3.1/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java
--- maven-source-plugin-3.3.1.orig/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java 2024-09-24 08:52:01.065274036 +0200
+++ maven-source-plugin-3.3.1/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java 2024-09-24 08:52:08.211989382 +0200
@@ -390,6 +390,14 @@
archiver.setCreatedBy("Maven Source Plugin", "org.apache.maven.plugins", "maven-source-plugin");
archiver.setBuildJdkSpecDefaultEntry(false);
+ if ( outputTimestamp == null ||
+ outputTimestamp.length() < 1 ||
+ ( ( outputTimestamp.length() == 1 )
+ && !Character.isDigit( outputTimestamp.charAt(0) ) ) )
+ {
+ outputTimestamp = System.getenv("SOURCE_DATE_EPOCH");
+ }
+
// configure for Reproducible Builds based on outputTimestamp value
archiver.configureReproducibleBuild(outputTimestamp);