forked from pool/maven-javadoc-plugin
Compare commits
8 Commits
97f0c71909
...
dad2dca0fa
Author | SHA256 | Date | |
---|---|---|---|
dad2dca0fa | |||
f73c86fea7 | |||
11457af9da | |||
d2b5cc7233 | |||
bcdd86c673 | |||
b90f0e7d88 | |||
180d1f0c7e | |||
34e929fac6 |
@@ -1,14 +1,15 @@
|
||||
From 116c679c73cc6f4a4826cedfde2d63496cfd0b2d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Mon, 30 Sep 2024 19:54:38 +0200
|
||||
Subject: [PATCH 1/3] Be consistent about data encoding
|
||||
From 33c9f01af9a3d4d28decbabd0bc02c4b3a875c2d Mon Sep 17 00:00:00 2001
|
||||
From: Fridrich Strba <fridrich@users.noreply.github.com>
|
||||
Date: Tue, 15 Jul 2025 02:23:18 +0200
|
||||
Subject: [PATCH 1/3] Be consistent about data encoding when copying files
|
||||
(#1215)
|
||||
|
||||
---
|
||||
.../maven/plugins/javadoc/StaleHelper.java | 26 +++++++++++++------
|
||||
1 file changed, 18 insertions(+), 8 deletions(-)
|
||||
.../maven/plugins/javadoc/StaleHelper.java | 26 ++++++++++++-------
|
||||
1 file changed, 16 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java b/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java
|
||||
index aabe9840..9bebe146 100644
|
||||
index aabe9840..7517d0fb 100644
|
||||
--- a/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java
|
||||
+++ b/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java
|
||||
@@ -40,6 +40,20 @@ import org.codehaus.plexus.util.cli.Commandline;
|
||||
@@ -32,7 +33,7 @@ index aabe9840..9bebe146 100644
|
||||
/**
|
||||
* Compute the data used to detect a stale javadoc
|
||||
*
|
||||
@@ -55,13 +69,7 @@ public class StaleHelper {
|
||||
@@ -55,18 +69,10 @@ public class StaleHelper {
|
||||
String[] args = cmd.getArguments();
|
||||
Collections.addAll(options, args);
|
||||
|
||||
@@ -43,23 +44,24 @@ index aabe9840..9bebe146 100644
|
||||
- } else {
|
||||
- cs = Charset.defaultCharset();
|
||||
- }
|
||||
+ final Charset cs = getDataCharset();
|
||||
|
||||
-
|
||||
for (String arg : args) {
|
||||
if (arg.startsWith("@")) {
|
||||
@@ -115,9 +123,11 @@ public class StaleHelper {
|
||||
*/
|
||||
public static void writeStaleData(Commandline cmd, Path path) throws MavenReportException {
|
||||
String name = arg.substring(1);
|
||||
- options.addAll(Files.readAllLines(dir.resolve(name), cs));
|
||||
+ options.addAll(Files.readAllLines(dir.resolve(name), getDataCharset()));
|
||||
ignored.add(name);
|
||||
}
|
||||
}
|
||||
@@ -117,7 +123,7 @@ public class StaleHelper {
|
||||
try {
|
||||
+ final Charset cs = getDataCharset();
|
||||
+
|
||||
List<String> curdata = getStaleData(cmd);
|
||||
Files.createDirectories(path.getParent());
|
||||
- Files.write(path, curdata, StandardCharsets.UTF_8);
|
||||
+ Files.write(path, curdata, cs);
|
||||
+ Files.write(path, curdata, getDataCharset());
|
||||
} catch (IOException e) {
|
||||
throw new MavenReportException("Error checking stale data", e);
|
||||
}
|
||||
--
|
||||
2.50.0
|
||||
2.50.1
|
||||
|
@@ -1,29 +0,0 @@
|
||||
From c5ea1d8b25ab1958ece6d6f3652ca879bd406fac Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Mon, 30 Sep 2024 19:53:57 +0200
|
||||
Subject: [PATCH 3/3] reproducible from environment
|
||||
|
||||
---
|
||||
.../apache/maven/plugins/javadoc/AbstractJavadocMojo.java | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
|
||||
index 2c258c7e..ddcb6ede 100644
|
||||
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
|
||||
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
|
||||
@@ -2671,6 +2671,12 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
|
||||
private String getBottomText() {
|
||||
final String inceptionYear = project.getInceptionYear();
|
||||
|
||||
+ if (outputTimestamp == null
|
||||
+ || outputTimestamp.length() < 1
|
||||
+ || ((outputTimestamp.length() == 1) && !Character.isDigit(outputTimestamp.charAt(0)))) {
|
||||
+ outputTimestamp = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ }
|
||||
+
|
||||
// get Reproducible Builds outputTimestamp date value or the current local date.
|
||||
final LocalDate localDate = MavenArchiver.parseBuildOutputTimestamp(outputTimestamp)
|
||||
.map(instant -> instant.atZone(ZoneOffset.UTC).toLocalDate())
|
||||
--
|
||||
2.50.0
|
||||
|
@@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 17 05:40:16 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Removed patch:
|
||||
* 0003-reproducible-from-environment.patch
|
||||
+ We made the modification more central in maven-archiver
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 15 11:40:44 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Modified patches:
|
||||
* 0001-Be-consistent-about-data-encoding.patch ->
|
||||
0001-Be-consistent-about-data-encoding-when-copying-files.patch
|
||||
+ Take the version of our PR that was integrated upstream
|
||||
* 0003-reproducible-from-environment.patch
|
||||
+ Make the situation exactly the same as before if the
|
||||
SOURCE_DATE_EPOCH is not set
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 12 08:03:13 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@@ -32,9 +32,8 @@ URL: https://maven.apache.org/plugins/maven-javadoc-plugin
|
||||
Source0: %{base_name}-%{version}.tar.xz
|
||||
Source1: %{base_name}-build.xml
|
||||
Patch0: %{base_name}-bootstrap-resources.patch
|
||||
Patch1: 0001-Be-consistent-about-data-encoding.patch
|
||||
Patch1: 0001-Be-consistent-about-data-encoding-when-copying-files.patch
|
||||
Patch2: 0002-Make-the-legacyMode-consistent-and-actually-useful.patch
|
||||
Patch3: 0003-reproducible-from-environment.patch
|
||||
BuildRequires: apache-commons-io
|
||||
BuildRequires: apache-commons-lang3
|
||||
BuildRequires: apache-commons-text
|
||||
@@ -118,7 +117,6 @@ cp %{SOURCE1} build.xml
|
||||
%endif
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
%patch -P 3 -p1
|
||||
|
||||
%pom_remove_dep :::test:
|
||||
|
||||
|
Reference in New Issue
Block a user