[ 
https://issues.apache.org/jira/browse/MJAVADOC-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690942#comment-17690942
 ] 

Konrad Windszus edited comment on MJAVADOC-742 at 2/19/23 9:14 PM:
-------------------------------------------------------------------

I tried to first install the doclet from the reproducer repo mentioned above 
into the local repo and afterwards executed the {{project}} with {{mvn 
javadoc:javadoc}}.
With both m-javadoc- 3.5.0 and 3.4.1 I run into
{code}
[INFO] --- javadoc:3.4.1:javadoc (default-cli) @ project ---
[WARNING] Source files encoding has not been set, using platform encoding 
UTF-8, i.e. build is platform dependent!
[INFO] No previous run data found, generating javadoc.
[INFO] 
2 errors
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.900 s
[INFO] Finished at: 2023-02-19T22:10:09+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:3.4.1:javadoc (default-cli) on 
project project: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 4 - javadoc: error - fatal error encountered: 
java.lang.NullPointerException
[ERROR] javadoc: error - Please file a bug against the javadoc tool via the 
Java bug reporting page
[ERROR] (http://bugreport.java.com) after checking the Bug Database 
(http://bugs.java.com)
[ERROR] for duplicates. Include error messages and the following diagnostic in 
your report. Thank you.
[ERROR] java.lang.NullPointerException
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.handleDocletOptions(Start.java:634)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.parseArgs(Start.java:806)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:529)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:432)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:345)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
[ERROR]         at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
[ERROR] 
[ERROR] Command line was: 
/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin/javadoc 
@options @argfile
[ERROR] 
[ERROR] Refer to the generated Javadoc files in 
'/Users/konradwindszus/git/maven/MJAVADOC-742/project/target/site/apidocs' dir.
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
{code}

This happens with 
{code}
mvn --version
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: /opt/homebrew/Cellar/maven/3.9.0/libexec
Java version: 11.0.18, vendor: Eclipse Adoptium, runtime: 
/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "12.6.3", arch: "aarch64", family: "mac"
{code}

[~tario] Which error message do you see with which JDK and Maven version?


was (Author: kwin):
I tried to first install the doclet from the reproducer repo mentioned above 
into the local repo and afterwards executed the {{project}} with {{mvn 
javadoc:javadoc}}.
With both m-javadoc 3.5.0 and 3.4.1 I run into
{code}
[INFO] --- javadoc:3.4.1:javadoc (default-cli) @ project ---
[WARNING] Source files encoding has not been set, using platform encoding 
UTF-8, i.e. build is platform dependent!
[INFO] No previous run data found, generating javadoc.
[INFO] 
2 errors
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.900 s
[INFO] Finished at: 2023-02-19T22:10:09+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:3.4.1:javadoc (default-cli) on 
project project: An error has occurred in Javadoc report generation: 
[ERROR] Exit code: 4 - javadoc: error - fatal error encountered: 
java.lang.NullPointerException
[ERROR] javadoc: error - Please file a bug against the javadoc tool via the 
Java bug reporting page
[ERROR] (http://bugreport.java.com) after checking the Bug Database 
(http://bugs.java.com)
[ERROR] for duplicates. Include error messages and the following diagnostic in 
your report. Thank you.
[ERROR] java.lang.NullPointerException
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.handleDocletOptions(Start.java:634)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.parseArgs(Start.java:806)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:529)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:432)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:345)
[ERROR]         at 
jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
[ERROR]         at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
[ERROR] 
[ERROR] Command line was: 
/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin/javadoc 
@options @argfile
[ERROR] 
[ERROR] Refer to the generated Javadoc files in 
'/Users/konradwindszus/git/maven/MJAVADOC-742/project/target/site/apidocs' dir.
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
{code}

This happens with 
{code}
mvn --version
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: /opt/homebrew/Cellar/maven/3.9.0/libexec
Java version: 11.0.18, vendor: Eclipse Adoptium, runtime: 
/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "12.6.3", arch: "aarch64", family: "mac"
{code}

[~tario] Which error message do you see with which JDK and Maven version?

> [REGRESSION] Transitive dependencies of docletArtifact missing
> --------------------------------------------------------------
>
>                 Key: MJAVADOC-742
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-742
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>          Components: javadoc
>    Affects Versions: 3.5.0
>            Reporter: Patrick Ruckstuhl
>            Priority: Blocker
>
> It looks like with 3.5.0 transitive dependencies of the docletArtifact are no 
> longer added to the classpath and generation fails with class not found. 
> Reverting back to 3.4.1 everything works fine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to