Compare commits
73 Commits
Author | SHA256 | Date | |
---|---|---|---|
72670980ac | |||
449ee971c5 | |||
8a19e5fd0a | |||
01702e7d0e | |||
00bc2930c6 | |||
2e72ce1928 | |||
c3ac7d526a | |||
09a0ed68a9 | |||
6a317bd530 | |||
06f1423e15 | |||
1c69fd2eb4 | |||
54dcffc152 | |||
0cfa9367cd | |||
9ab5f70a65 | |||
b9bcdc8c60 | |||
26089ed5b5 | |||
266f28b837 | |||
a590f14c39 | |||
a3c07e7e67 | |||
ce20f5ef6e | |||
8bf06992a8 | |||
f48d1aa4e8 | |||
b976493910 | |||
1bee619c25 | |||
0bd0590a91 | |||
322d57e026 | |||
da47e022c4 | |||
d9f4c5b850 | |||
cdf228186c | |||
551f7fb90a | |||
e54d67efc0 | |||
f8466649f9 | |||
265e8edb65 | |||
609b338de9 | |||
dd5b20a748 | |||
49ec9021f4 | |||
bcc60f51af | |||
e28313a0c4 | |||
c6c5f6471e | |||
2dca021c34 | |||
3e8693949b | |||
cb2049151d | |||
fa9c932465 | |||
bc2da8a107 | |||
378ef12489 | |||
60dad0c18a | |||
108b37bde5 | |||
4843357abe | |||
d06564b033 | |||
7cae215af8 | |||
7cbb5f2f80 | |||
a495780e90 | |||
d762d53523 | |||
a63b44ba60 | |||
581764f7e9 | |||
fe21ad1546 | |||
1604720f89 | |||
ed540573a2 | |||
42af0b3782 | |||
7e47f23025 | |||
cc3d3a9dfe | |||
49075ced15 | |||
a0a6c6735f | |||
7e1dd8f0dd | |||
a78d82b521 | |||
|
06b09cabda | ||
3cbc211562 | |||
9d532c15b5 | |||
a0e38e0d28 | |||
5434288040 | |||
de20385d52 | |||
ef6e6e747b | |||
d4b5a67c53 |
@@ -1,65 +0,0 @@
|
||||
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
|
||||
|
||||
---
|
||||
.../maven/plugins/javadoc/StaleHelper.java | 26 +++++++++++++------
|
||||
1 file changed, 18 insertions(+), 8 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
|
||||
--- 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;
|
||||
*/
|
||||
public class StaleHelper {
|
||||
|
||||
+ /**
|
||||
+ * Compute the encoding of the stale javadoc
|
||||
+ *
|
||||
+ * @return the the encoding of the stale data
|
||||
+ */
|
||||
+ private static Charset getDataCharset() {
|
||||
+ if (JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast("9")
|
||||
+ && JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore("12")) {
|
||||
+ return StandardCharsets.UTF_8;
|
||||
+ } else {
|
||||
+ return Charset.defaultCharset();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Compute the data used to detect a stale javadoc
|
||||
*
|
||||
@@ -55,13 +69,7 @@ public class StaleHelper {
|
||||
String[] args = cmd.getArguments();
|
||||
Collections.addAll(options, args);
|
||||
|
||||
- final Charset cs;
|
||||
- if (JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast("9")
|
||||
- && JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore("12")) {
|
||||
- cs = StandardCharsets.UTF_8;
|
||||
- } 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 {
|
||||
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);
|
||||
} catch (IOException e) {
|
||||
throw new MavenReportException("Error checking stale data", e);
|
||||
}
|
||||
--
|
||||
2.50.0
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a388ba730f6587358c4c2a056522cc4b510de0e857ca169b03dccc3a5f244db1
|
||||
size 818540
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:874d9531ca9d5807a595c119f571e7b723ac35e98f9117173c6dddf45887e643
|
||||
size 818276
|
@@ -1,17 +0,0 @@
|
||||
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
|
||||
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
|
||||
@@ -2692,6 +2692,14 @@ 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())
|
@@ -1,50 +0,0 @@
|
||||
--- 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,19 @@ import org.codehaus.plexus.util.cli.Commandline;
|
||||
*/
|
||||
public class StaleHelper {
|
||||
|
||||
+ private static Charset getDataCharset()
|
||||
+ {
|
||||
+ if ( JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast( "9" )
|
||||
+ && JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore( "12" ) )
|
||||
+ {
|
||||
+ return StandardCharsets.UTF_8;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return Charset.defaultCharset();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Compute the data used to detect a stale javadoc
|
||||
*
|
||||
@@ -55,13 +68,7 @@ public class StaleHelper {
|
||||
String[] args = cmd.getArguments();
|
||||
Collections.addAll(options, args);
|
||||
|
||||
- final Charset cs;
|
||||
- if (JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast("9")
|
||||
- && JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore("12")) {
|
||||
- cs = StandardCharsets.UTF_8;
|
||||
- } else {
|
||||
- cs = Charset.defaultCharset();
|
||||
- }
|
||||
+ final Charset cs = getDataCharset();
|
||||
|
||||
for (String arg : args) {
|
||||
if (arg.startsWith("@")) {
|
||||
@@ -115,9 +122,11 @@ public class StaleHelper {
|
||||
*/
|
||||
public static void writeStaleData(Commandline cmd, Path path) throws MavenReportException {
|
||||
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);
|
||||
} catch (IOException e) {
|
||||
throw new MavenReportException("Error checking stale data", e);
|
||||
}
|
Reference in New Issue
Block a user