maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Volodin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MJAVADOC-595) javadoc not found using java.home
Date Thu, 25 Apr 2019 13:59:00 GMT

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

Dmitry Volodin edited comment on MJAVADOC-595 at 4/25/19 1:58 PM:
------------------------------------------------------------------

[~rfscholte], looks like the reason, why it works fine since JDK 9 for most of the ITs, the
explicit JAVA_HOME env variable definition. It it not defined, it unable to autodetect 'javadoc'
path, and can't using 'javadoc' from the environment.

It must be 
{code:java}
SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand
{code}


was (Author: dmvolod):
[~rfscholte], looks like the reason, why it works fine since JDK 9 for most of teh ITs, the
explicit JAVA_HOME env variable definition. It it not defined, it unable to autodetect 'javadoc'
path, and can't using 'javadoc' from the environment.

It must be 
{code:java}
SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand
{code}

> javadoc not found using java.home 
> ----------------------------------
>
>                 Key: MJAVADOC-595
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-595
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Oliver Lüttin
>            Priority: Major
>
> When searching for the javadoc executable the plugin looks in java.home/../bin.
> This doesn't work with ubuntu 18.10 and java-11-openjdk.
> Instead it should look at java.hom/bin where the javadoc executable is located.
> Here's the code snippet from AbstactJavadocMojo:
> {code:java}
> 3720 private String getJavadocExecutable()
> 3721	throws IOException
> 3722	{
> ...
> 3768 else
> 3769	{
> 3770	javadocExe =
> 3771	new File( SystemUtils.getJavaHome() + File.separator + ".." +  File.separator +
"bin", javadocCommand );
> 3772	}
> {code}
>  
> As workaround one could configure the executable in the pom.xml:
>  
> {code:java}
> <configuration>
>     <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
> </configuration>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message