Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package maven-javadoc-plugin for 
openSUSE:Factory checked in at 2025-07-14 10:50:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/maven-javadoc-plugin (Old)
 and      /work/SRC/openSUSE:Factory/.maven-javadoc-plugin.new.7373 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "maven-javadoc-plugin"

Mon Jul 14 10:50:47 2025 rev:21 rq:1292312 version:3.11.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/maven-javadoc-plugin/maven-javadoc-plugin.changes    
    2025-06-03 17:55:00.985280640 +0200
+++ 
/work/SRC/openSUSE:Factory/.maven-javadoc-plugin.new.7373/maven-javadoc-plugin.changes
      2025-07-14 10:55:57.127203846 +0200
@@ -1,0 +2,16 @@
+Sat Jul 12 08:03:13 UTC 2025 - Fridrich Strba <fst...@suse.com>
+
+- Added patch:
+  * 0002-Make-the-legacyMode-consistent-and-actually-useful.patch
+    + fix the legacy mode so that is behaves really as javadoc 8
+      generation
+- Modified patches:
+  * stale-data-encoding.patch
+    --> 0001-Be-consistent-about-data-encoding.patch
+    + rebase and fix the coding style so that it corresponds to
+      our PR to the upstream project
+  * reproducible-from-environment.patch
+    --> 0003-reproducible-from-environment.patch
+    + rebase and make consistent with upstream coding style
+
+-------------------------------------------------------------------

Old:
----
  reproducible-from-environment.patch
  stale-data-encoding.patch

New:
----
  0001-Be-consistent-about-data-encoding.patch
  0002-Make-the-legacyMode-consistent-and-actually-useful.patch
  0003-reproducible-from-environment.patch

----------(Old B)----------
  Old:      our PR to the upstream project
  * reproducible-from-environment.patch
    --> 0003-reproducible-from-environment.patch
  Old:- Modified patches:
  * stale-data-encoding.patch
    --> 0001-Be-consistent-about-data-encoding.patch
----------(Old E)----------

----------(New B)----------
  New:  * stale-data-encoding.patch
    --> 0001-Be-consistent-about-data-encoding.patch
    + rebase and fix the coding style so that it corresponds to
  New:- Added patch:
  * 0002-Make-the-legacyMode-consistent-and-actually-useful.patch
    + fix the legacy mode so that is behaves really as javadoc 8
  New:  * reproducible-from-environment.patch
    --> 0003-reproducible-from-environment.patch
    + rebase and make consistent with upstream coding style
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ maven-javadoc-plugin.spec ++++++
--- /var/tmp/diff_new_pack.W3JApm/_old  2025-07-14 10:55:57.931237143 +0200
+++ /var/tmp/diff_new_pack.W3JApm/_new  2025-07-14 10:55:57.931237143 +0200
@@ -32,8 +32,9 @@
 Source0:        %{base_name}-%{version}.tar.xz
 Source1:        %{base_name}-build.xml
 Patch0:         %{base_name}-bootstrap-resources.patch
-Patch1:         stale-data-encoding.patch
-Patch2:         reproducible-from-environment.patch
+Patch1:         0001-Be-consistent-about-data-encoding.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
@@ -117,6 +118,7 @@
 %endif
 %patch -P 1 -p1
 %patch -P 2 -p1
+%patch -P 3 -p1
 
 %pom_remove_dep :::test:
 

++++++ 0001-Be-consistent-about-data-encoding.patch ++++++
>From 116c679c73cc6f4a4826cedfde2d63496cfd0b2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.st...@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


++++++ 0002-Make-the-legacyMode-consistent-and-actually-useful.patch ++++++
>From 6535af41fdb17f29df87194c12f7dc725990f647 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.st...@bluewin.ch>
Date: Sat, 12 Jul 2025 09:48:17 +0200
Subject: [PATCH 2/3] Make the legacyMode consistent and actually useful

  * Filter out all of the module-info.java files in legacy mode
  * Do not use --source-path in legacy mode as not to suck any
    of those module-info.java files back
  * Generate the javadoc from list of files and not list of
    packages, which is not working if --source-path is not
    specified
---
 .../plugins/javadoc/AbstractJavadocMojo.java  | 29 ++++++++++---------
 1 file changed, 16 insertions(+), 13 deletions(-)

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 42a20b9d..2c258c7e 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -2022,7 +2022,7 @@ public abstract class AbstractJavadocMojo extends 
AbstractMojo {
             getLog().warn("sourceFileIncludes and sourceFileExcludes have no 
effect when subpackages are specified!");
             includesExcludesActive = false;
         }
-        if (!packageNames.isEmpty() && !includesExcludesActive) {
+        if (!packageNames.isEmpty() && !includesExcludesActive && !legacyMode) 
{
             addCommandLinePackages(cmd, javadocOutputDirectory, packageNames);
 
             // 
----------------------------------------------------------------------
@@ -2093,23 +2093,26 @@ public abstract class AbstractJavadocMojo extends 
AbstractMojo {
         if (subpackages == null || subpackages.isEmpty()) {
             Collection<String> excludedPackages = getExcludedPackages();
 
-            final boolean autoExclude;
-            if (release != null) {
-                autoExclude = JavaVersion.parse(release).isBefore("9");
-            } else if (source != null) {
-                autoExclude = JavaVersion.parse(source).isBefore("9");
-            } else {
-                // if legacy mode is active, treat it like pre-Java 9 (exclude 
module-info),
-                // otherwise don't auto-exclude anything.
-                autoExclude = legacyMode;
+            // if legacy mode is active, treat it like pre-Java 9 (exclude 
module-info),
+            // otherwise don't auto-exclude anything. Do this regardless of 
the release
+            // or source values specified
+            boolean autoExclude = legacyMode;
+            if (!autoExclude) {
+                if (release != null) {
+                    autoExclude = JavaVersion.parse(release).isBefore("9");
+                } else if (source != null) {
+                    autoExclude = JavaVersion.parse(source).isBefore("9");
+                }
             }
 
             for (Path sourcePath : sourcePaths) {
                 File sourceDirectory = sourcePath.toFile();
-                List<String> files = new 
ArrayList<>(JavadocUtil.getFilesFromSource(
+                ArrayList<String> files = new 
ArrayList<>(JavadocUtil.getFilesFromSource(
                         sourceDirectory, sourceFileIncludes, 
sourceFileExcludes, excludedPackages));
 
-                if (autoExclude && files.remove("module-info.java")) {
+                // in the aggregate goal (and theoretically in others too), 
there can be
+                // more then one module-info.java. Filter out all of them.
+                if (autoExclude && files.removeIf(s -> 
s.endsWith("module-info.java"))) {
                     getLog().debug("Auto exclude module-info.java due to 
source value");
                 }
                 mappedFiles.put(sourcePath, files);
@@ -4603,7 +4606,7 @@ public abstract class AbstractJavadocMojo extends 
AbstractMojo {
         }
 
         if (moduleSourceDir == null) {
-            if (!disableSourcepathUsage) {
+            if (!disableSourcepathUsage && !legacyMode) {
                 addArgIfNotEmpty(
                         arguments,
                         "-sourcepath",
-- 
2.50.0


++++++ 0003-reproducible-from-environment.patch ++++++
>From c5ea1d8b25ab1958ece6d6f3652ca879bd406fac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.st...@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

Reply via email to