Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
3.3.0
-
None
-
None
-
None
-
Intellij Idea Ultimate 2021.1.3, Windows 10
Description
If a used dependency has a not defined URL in its pom.xml, this plugin throws a NPE when trying to build it with goal javadoc:javadoc.
Stacktrace:
[ERROR] Error while creating javadoc report: null java.lang.NullPointerException at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.isValidJavadocLink (AbstractJavadocMojo.java:6694) at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getDependenciesLinks (AbstractJavadocMojo.java:6483) at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.collectLinks (AbstractJavadocMojo.java:3396) at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addLinkArguments (AbstractJavadocMojo.java:4362) at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions (AbstractJavadocMojo.java:5589) at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport (AbstractJavadocMojo.java:2170) at org.apache.maven.plugins.javadoc.JavadocReport.generate (JavadocReport.java:135) at org.apache.maven.plugins.javadoc.JavadocReport.doExecute (JavadocReport.java:324) at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute (AbstractJavadocMojo.java:2010) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Configuration:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>3.3.0</version> <configuration> <show>protected</show> <detectLinks>true</detectLinks> <links> <link>https://javadoc.io/doc/org.jetbrains/annotations/19.0.0/</link> <link>https://logging.apache.org/log4j/2.x/log4j-api/apidocs/</link> </links> <failOnError>false</failOnError> </configuration> </plugin>
Attachments
Issue Links
- causes
-
MJAVADOC-693 NPE if URL is not defined in a dependency
- Closed
I've to reproduce it with the provided configuration in a minimum POM, but it succeeds, as expected.