File: ignore-source-errors.patch

package info (click to toggle)
maven-javadoc-plugin 3.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,176 kB
  • sloc: java: 16,707; xml: 9,530; jsp: 5; makefile: 2; sh: 1
file content (19 lines) | stat: -rw-r--r-- 937 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Ignore source errors when using the default doclet with Java 9
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -5525,6 +5525,13 @@
                 arguments.add( additionalOption.replaceAll( "(?<!\\\\)\\\\(?!\\\\|:)", "\\\\" ) );
             }
         }
+
+        // ignore source errors when using the default doclet with Java 9
+        if ( doclet == null && org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast( org.apache.commons.lang3.JavaVersion.JAVA_9 ) && !arguments.contains( "--ignore-source-errors" ) )
+        {
+            getLog().info("Adding the --ignore-source-errors option");
+            arguments.add( "--ignore-source-errors" );
+        }
     }
 
     private ResolvePathResult getResolvePathResult( File artifactFile )