forked from pool/maven-javadoc-plugin
Compare commits
25 Commits
Author | SHA256 | Date | |
---|---|---|---|
72670980ac | |||
2faf59ff75 | |||
f125c3d4c2 | |||
aca051d3cb | |||
a7a7f3ba5f | |||
db6efdb020 | |||
30c2b5789a | |||
74ec0e37b7 | |||
449ee971c5 | |||
8a19e5fd0a | |||
01702e7d0e | |||
00bc2930c6 | |||
2e72ce1928 | |||
c3ac7d526a | |||
09a0ed68a9 | |||
6a317bd530 | |||
06f1423e15 | |||
1c69fd2eb4 | |||
54dcffc152 | |||
0cfa9367cd | |||
9ab5f70a65 | |||
b9bcdc8c60 | |||
26089ed5b5 | |||
266f28b837 | |||
a590f14c39 |
@@ -0,0 +1,67 @@
|
|||||||
|
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, 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..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;
|
||||||
|
*/
|
||||||
|
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,18 +69,10 @@ 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();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
for (String arg : args) {
|
||||||
|
if (arg.startsWith("@")) {
|
||||||
|
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 {
|
||||||
|
List<String> curdata = getStaleData(cmd);
|
||||||
|
Files.createDirectories(path.getParent());
|
||||||
|
- Files.write(path, curdata, StandardCharsets.UTF_8);
|
||||||
|
+ Files.write(path, curdata, getDataCharset());
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new MavenReportException("Error checking stale data", e);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.50.1
|
||||||
|
|
@@ -0,0 +1,78 @@
|
|||||||
|
From 6535af41fdb17f29df87194c12f7dc725990f647 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@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
|
||||||
|
|
2
_service
2
_service
@@ -2,7 +2,7 @@
|
|||||||
<service name="tar_scm" mode="disabled">
|
<service name="tar_scm" mode="disabled">
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="url">https://github.com/apache/maven-javadoc-plugin.git</param>
|
<param name="url">https://github.com/apache/maven-javadoc-plugin.git</param>
|
||||||
<param name="revision">maven-javadoc-plugin-3.11.3</param>
|
<param name="revision">maven-javadoc-plugin-3.11.2</param>
|
||||||
<param name="match-tag">maven-javadoc-plugin-*</param>
|
<param name="match-tag">maven-javadoc-plugin-*</param>
|
||||||
<param name="versionformat">@PARENT_TAG@</param>
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
<param name="versionrewrite-pattern">maven-javadoc-plugin-(.*)</param>
|
<param name="versionrewrite-pattern">maven-javadoc-plugin-(.*)</param>
|
||||||
|
BIN
maven-javadoc-plugin-3.11.2.tar.xz
(Stored with Git LFS)
Normal file
BIN
maven-javadoc-plugin-3.11.2.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:50af43bddd3429a934a618dc5761051dd27832e46a0db365f1eddc07a36ea127
|
|
||||||
size 823220
|
|
@@ -14,7 +14,7 @@
|
|||||||
value="The Apache Maven Javadoc Plugin is a plugin that uses the javadoc tool for generating javadocs for the specified project."/>
|
value="The Apache Maven Javadoc Plugin is a plugin that uses the javadoc tool for generating javadocs for the specified project."/>
|
||||||
<property name="project.groupId" value="org.apache.maven.plugins"/>
|
<property name="project.groupId" value="org.apache.maven.plugins"/>
|
||||||
<property name="project.artifactId" value="maven-javadoc-plugin"/>
|
<property name="project.artifactId" value="maven-javadoc-plugin"/>
|
||||||
<property name="project.version" value="3.11.3"/>
|
<property name="project.version" value="3.11.2"/>
|
||||||
<property name="project.organization.name" value="The Apache Software Foundation"/>
|
<property name="project.organization.name" value="The Apache Software Foundation"/>
|
||||||
|
|
||||||
<property name="spec.version" value="3.11"/>
|
<property name="spec.version" value="3.11"/>
|
||||||
|
@@ -1,42 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Sun Aug 17 07:08:31 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
|
||||||
|
|
||||||
- Upgrade to upstream version 3.11.3
|
|
||||||
* Removed
|
|
||||||
+ Remove workaround for long patched CVE in javadoc
|
|
||||||
* New features and improvements
|
|
||||||
+ Issue #369 Support --no-fonts option per default for jdk 23+
|
|
||||||
* Bug Fixes
|
|
||||||
+ Make the legacyMode consistent (Filter out all of the
|
|
||||||
module-info.java files in legacy mode, do not use
|
|
||||||
--source-path in legacy mode)
|
|
||||||
+ MJAVADOC-826: Don't try to modify project source roots
|
|
||||||
* Documentation updates
|
|
||||||
+ Correct javadoc-no-fork description on index-page
|
|
||||||
+ MNGSITE-529: Rename "Goals" to "Plugin Documentation"
|
|
||||||
+ (doc) Close links tag in links parameter javadoc example
|
|
||||||
* Maintenance
|
|
||||||
+ Be consistent about data encoding when copying files
|
|
||||||
+ Clean up JavadocUtilTest
|
|
||||||
+ Use Java 7 relativization instead of hand-rolled code
|
|
||||||
+ Rephrase source code fix interactive messages for clarity
|
|
||||||
+ Reduce non-debug logging
|
|
||||||
+ Delete duplicate @throws clause
|
|
||||||
+ Use Java 7 relativization instead of our hand-rolled code
|
|
||||||
+ Clean up comments and argument names
|
|
||||||
+ Issue #378 Cleanup of code related to old non supported Java
|
|
||||||
version
|
|
||||||
+ Cure deprecation warning
|
|
||||||
+ MJAVADOC-773: deprecate toRelative
|
|
||||||
+ Issue #373 Fix JDK 23 build
|
|
||||||
+ Fix aggregate Javadoc typo
|
|
||||||
+ Enable GH issues
|
|
||||||
+ MJAVADOC-825: Prefer NullPointerExceptions for null arguments
|
|
||||||
- Removed patches:
|
|
||||||
* 0001-Be-consistent-about-data-encoding-when-copying-files.patch
|
|
||||||
* 0002-Make-the-legacyMode-consistent-and-actually-useful.patch
|
|
||||||
+ integrated in this version
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 17 05:40:16 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
Thu Jul 17 05:40:16 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package maven-javadoc-plugin
|
# spec file for package maven-javadoc-plugin
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC and contributors
|
# Copyright (c) 2025 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
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
%bcond_with bootstrap
|
%bcond_with bootstrap
|
||||||
%endif
|
%endif
|
||||||
%global base_name maven-javadoc-plugin
|
%global base_name maven-javadoc-plugin
|
||||||
Version: 3.11.3
|
Version: 3.11.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Maven plugin for creating javadocs
|
Summary: Maven plugin for creating javadocs
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@@ -32,6 +32,8 @@ URL: https://maven.apache.org/plugins/maven-javadoc-plugin
|
|||||||
Source0: %{base_name}-%{version}.tar.xz
|
Source0: %{base_name}-%{version}.tar.xz
|
||||||
Source1: %{base_name}-build.xml
|
Source1: %{base_name}-build.xml
|
||||||
Patch0: %{base_name}-bootstrap-resources.patch
|
Patch0: %{base_name}-bootstrap-resources.patch
|
||||||
|
Patch1: 0001-Be-consistent-about-data-encoding-when-copying-files.patch
|
||||||
|
Patch2: 0002-Make-the-legacyMode-consistent-and-actually-useful.patch
|
||||||
BuildRequires: apache-commons-io
|
BuildRequires: apache-commons-io
|
||||||
BuildRequires: apache-commons-lang3
|
BuildRequires: apache-commons-lang3
|
||||||
BuildRequires: apache-commons-text
|
BuildRequires: apache-commons-text
|
||||||
@@ -113,6 +115,8 @@ API documentation for %{name}.
|
|||||||
cp %{SOURCE1} build.xml
|
cp %{SOURCE1} build.xml
|
||||||
%patch -P 0 -p1
|
%patch -P 0 -p1
|
||||||
%endif
|
%endif
|
||||||
|
%patch -P 1 -p1
|
||||||
|
%patch -P 2 -p1
|
||||||
|
|
||||||
%pom_remove_dep :::test:
|
%pom_remove_dep :::test:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user