[java-parent-project] branch main updated: JPAR-178 - Revert - Update maven-javadoc-plugin to 3.3.0

Phil Smart philip.smart at jisc.ac.uk
Tue Jul 6 13:59:07 UTC 2021


This is an automated email from the git hooks/post-receive script.

philsmart pushed a commit to branch main
in repository java-parent-project.

View the commit online:
http://git.shibboleth.net/view/?p=java-parent-project.git;a=commit;h=673b53d010d867f8c2057b33551f13c3565889fc

The following commit(s) were added to refs/heads/main by this push:
       new  673b53d   JPAR-178 - Revert - Update maven-javadoc-plugin to 3.3.0
673b53d is described below

commit 673b53d010d867f8c2057b33551f13c3565889fc
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Tue Jul 6 14:59:05 2021 +0100

    JPAR-178 - Revert - Update maven-javadoc-plugin to 3.3.0
    
    Revert changes, moving back to the patched maven-javadoc-plugin V3.2.0.
    
    https://issues.shibboleth.net/jira/browse/JPAR-178
---
 pom.xml                                            |  15 +-
 ...-165-Add-Maven-Javadoc-Plugin-3.2.0-patch.patch | 160 +++++++++++++++++++++
 2 files changed, 171 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7f74fcd..d87758e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,7 @@
         <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
         <maven-install-plugin.version>3.0.0-M1</maven-install-plugin.version>
         <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
-        <maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
+        <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
         <maven-jxr-plugin.version>3.0.0</maven-jxr-plugin.version>
         <maven-project-info-reports-plugin.version>3.1.1</maven-project-info-reports-plugin.version>
         <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
@@ -715,8 +715,15 @@
                     <artifactId>maven-jar-plugin</artifactId>
                     <version>${maven-jar-plugin.version}</version>
                 </plugin>
+                <!--
+                    Patched version of this plugin, see:
+
+                    https://issues.shibboleth.net/jira/browse/JPAR-164
+
+                    Possibly replace with official version post 3.2.0
+                -->
                 <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
+                    <groupId>net.shibboleth.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
                     <version>${maven-javadoc-plugin.version}</version>
                     <configuration>
@@ -905,7 +912,7 @@
             <!-- We use the aggregate reports for the javadoc and jxr reports because even if the project isn't a multi-module
                 project the plugin still does the right thing. -->
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
+                <groupId>net.shibboleth.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>${maven-javadoc-plugin.version}</version>
                 <configuration>
@@ -1071,7 +1078,7 @@
                         <artifactId>maven-dependency-plugin</artifactId>
                     </plugin>                   
                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
+                        <groupId>net.shibboleth.maven.plugins</groupId>
                         <artifactId>maven-javadoc-plugin</artifactId>
                         <executions>
                             <execution>
diff --git a/resources/maven/JPAR-165-Add-Maven-Javadoc-Plugin-3.2.0-patch.patch b/resources/maven/JPAR-165-Add-Maven-Javadoc-Plugin-3.2.0-patch.patch
new file mode 100644
index 0000000..43f186c
--- /dev/null
+++ b/resources/maven/JPAR-165-Add-Maven-Javadoc-Plugin-3.2.0-patch.patch
@@ -0,0 +1,160 @@
+From aac7956462ef219ed1be028097ce63e0ae05f026 Mon Sep 17 00:00:00 2001
+From: Phil Smart <philip.smart at jisc.ac.uk>
+Date: Thu, 9 Apr 2020 16:50:49 +0100
+Subject: [PATCH 1/3] JPAR-165 Add Maven Javadoc Plugin 3.2.0 patch
+
+Patch the modulesForAggregatedProject to normalise module
+file paths.
+
+https://issues.shibboleth.net/jira/browse/JPAR-165
+---
+ .../org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java   | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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 83c3bd0..250690e 100644
+--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
++++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+@@ -2405,7 +2405,7 @@ public abstract class AbstractJavadocMojo
+         List<Path> modulePaths = new LinkedList<>();
+         for ( String module :  aggregatedProject.getModules() )
+         {
+-            modulePaths.add( new File( aggregatedProject.getBasedir(), module ).toPath() );
++            modulePaths.add( new File( aggregatedProject.getBasedir(), module ).toPath().normalize() );
+         }
+ 
+         Set<MavenProject> aggregatedModules = new LinkedHashSet<>();
+-- 
+2.21.0 (Apple Git-122.2)
+
+
+From 74f4d47db33f679c0ea1fa637818d16b72c1cb20 Mon Sep 17 00:00:00 2001
+From: Phil Smart <philip.smart at jisc.ac.uk>
+Date: Thu, 16 Apr 2020 16:56:05 +0100
+Subject: [PATCH 2/3] JPAR-165 Add Maven Javadoc Plugin 3.2.0 patch
+
+ - Add log statement to the start of plugin execution
+ - Change POM for internal project use
+
+https://issues.shibboleth.net/jira/browse/JPAR-165
+---
+ pom.xml                                       | 31 +++++++------------
+ .../plugins/javadoc/AbstractJavadocMojo.java  |  1 +
+ 2 files changed, 12 insertions(+), 20 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index 465e4ae..dff54fa 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -29,13 +29,14 @@ under the License.
+     <relativePath />
+   </parent>
+ 
++  <groupId>net.shibboleth.maven.plugins</groupId>
+   <artifactId>maven-javadoc-plugin</artifactId>
+   <version>3.2.0</version>
+   <packaging>maven-plugin</packaging>
+ 
+   <name>Apache Maven Javadoc Plugin</name>
+   <description>
+-    The Apache Maven Javadoc Plugin is a plugin that uses the javadoc tool for
++    Patched version of The Apache Maven Javadoc Plugin which supports flat maven mulit-module projects. The Apache Maven Javadoc Plugin is a plugin that uses the javadoc tool for
+     generating javadocs for the specified project.
+   </description>
+   <inceptionYear>2004</inceptionYear>
+@@ -44,26 +45,16 @@ under the License.
+     <maven>${mavenVersion}</maven>
+   </prerequisites>
+ 
+-  <scm>
+-    <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git</connection>
+-    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git</developerConnection>
+-    <url>https://github.com/apache/maven-javadoc-plugin/tree/${project.scm.tag}</url>
+-    <tag>maven-javadoc-plugin-3.2.0</tag>
+-  </scm>
+-  <issueManagement>
+-    <system>jira</system>
+-    <url>https://issues.apache.org/jira/browse/MJAVADOC</url>
+-  </issueManagement>
+-  <ciManagement>
+-    <system>Jenkins</system>
+-    <url>https://builds.apache.org/job/maven-box/job/maven-javadoc-plugin/</url>
+-  </ciManagement>
+   <distributionManagement>
+-    <site>
+-      <id>apache.website</id>
+-      <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>
+-    </site>
+-  </distributionManagement>
++        <repository>
++            <id>release</id>
++            <url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
++        </repository>
++        <snapshotRepository>
++            <id>snapshot</id>
++            <url>https://build.shibboleth.net/nexus/content/repositories/snapshots</url>
++        </snapshotRepository>
++    </distributionManagement>
+ 
+   <properties>
+     <javaVersion>7</javaVersion>
+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 250690e..351d642 100644
+--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
++++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+@@ -5801,6 +5801,7 @@ public abstract class AbstractJavadocMojo
+     private void doExecuteJavadocCommandLine( Commandline cmd, File javadocOutputDirectory )
+         throws MavenReportException
+     {
++        getLog().info( "Running patched (for flat multi-module projects) maven javadoc plugin" );
+         if ( getLog().isDebugEnabled() )
+         {
+             // no quoted arguments
+-- 
+2.21.0 (Apple Git-122.2)
+
+
+From 6bd376aae6466395a9049a8a535303312e9f61f0 Mon Sep 17 00:00:00 2001
+From: Phil Smart <philip.smart at jisc.ac.uk>
+Date: Tue, 28 Apr 2020 13:53:53 +0100
+Subject: [PATCH 3/3] JPAR-165 Add Maven Javadoc Plugin 3.2.0 patch
+
+     - Prevent the generation of module path arguments to
+       Javadoc. Instead always using the classpath
+       argument.
+
+    https://issues.shibboleth.net/jira/browse/JPAR-165
+---
+ .../maven/plugins/javadoc/AbstractJavadocMojo.java       | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 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 351d642..925b471 100644
+--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
++++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+@@ -4943,9 +4943,11 @@ public abstract class AbstractJavadocMojo
+ 
+         Map<String, JavaModuleDescriptor> allModuleDescriptors = new HashMap<>();
+ 
+-        boolean supportModulePath = javadocRuntimeVersion.isAtLeast( "9" )
+-            && ( source == null || JavaVersion.parse( source ).isAtLeast( "9" ) )
+-            && ( release == null || JavaVersion.parse( release ).isAtLeast( "9" ) );
++        // always use -classpath for javadoc, never use module-paths.
++        boolean supportModulePath = false;
++            //javadocRuntimeVersion.isAtLeast( "9" )
++            //&& ( source == null || JavaVersion.parse( source ).isAtLeast( "9" ) )
++            //&& ( release == null || JavaVersion.parse( release ).isAtLeast( "9" ) );
+ 
+         if ( supportModulePath )
+         {
+@@ -5218,6 +5220,7 @@ public abstract class AbstractJavadocMojo
+         }
+         else
+         {
++            getLog().info( " Building classpath javadoc argument" );
+             String classpath = StringUtils.join( getPathElements().iterator(), File.pathSeparator );
+             addArgIfNotEmpty( arguments, "-classpath", JavadocUtil.quotedPathArgument( classpath ) , false, false );
+         }
+-- 
+2.21.0 (Apple Git-122.2)
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list