maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MJAVADOC-504) NullPointerException in JavadocUtil.getJavaHome() when JAVA_HOME isn't set
Date Wed, 27 Dec 2017 11:47:00 GMT

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

Michael Osipov commented on MJAVADOC-504:
-----------------------------------------

That's correct,  I completely forgot it. Some components won't run. Do you expect to see a
{{BuildException}}?

> NullPointerException in JavadocUtil.getJavaHome() when JAVA_HOME isn't set
> --------------------------------------------------------------------------
>
>                 Key: MJAVADOC-504
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-504
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>         Environment: Debian, OpenJDK 8
>            Reporter: Emmanuel Bourg
>
> Hi,
> After upgrading to maven-javadoc-plugin I noticed a NullPointerException in {{JavadocUtil.getJavaHome()}}
when the JAVA_HOME environment variable isn't set:
> {noformat}
> java.lang.NullPointerException
>     at java.io.File.<init> (File.java:277)
>     at org.apache.maven.plugins.javadoc.JavadocUtil.getJavaHome (JavadocUtil.java:1302)
>     at org.apache.maven.plugins.javadoc.JavadocUtil.invokeMaven (JavadocUtil.java:941)
>     at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.getModulesLinks (AbstractJavadocMojo.java:5640)
>     at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addLinkofflineArguments (AbstractJavadocMojo.java:4046)
>     at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.addStandardDocletOptions
(AbstractJavadocMojo.java:4936)
>     at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport (AbstractJavadocMojo.java:2074)
>     at org.apache.maven.plugins.javadoc.JavadocReport.generate (JavadocReport.java:134)
>     at org.apache.maven.plugins.javadoc.JavadocReport.doExecute (JavadocReport.java:329)
>     at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute (AbstractJavadocMojo.java:1909)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
>     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:51)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:993)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:345)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:191)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:180)
> {noformat}
> This error doesn't occur with the version 3.0.0-M1 or when JAVA_HOME is set. It can be
reproduced on the byte-buddy project:
> {code}
> git clone https://github.com/raphw/byte-buddy
> cd byte-buddy
> git checkout byte-buddy-1.7.9
> mvn org.apache.maven.plugins:maven-javadoc-plugin:3.0.0:javadoc
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message