Laird Nelson created MJAVADOC-394:
-------------------------------------
Summary: javadoc is not found properly by default under Oracle's
JDK 7+ on Mac OSX
Key: MJAVADOC-394
URL: https://jira.codehaus.org/browse/MJAVADOC-394
Project: Maven Javadoc Plugin
Issue Type: Bug
Affects Versions: 2.9.1
Environment: Mac OSX, JDK 1.7+
Reporter: Laird Nelson
The logic to detect where the {{javadoc}} script is located is not correct for
Oracle's JVM 1.7 and higher on Mac OSX.
The logic inside of {{AbstractJavadocMojo}} currently special-cases all JVMs
running on OSX (line 3534):
{code:title=AbstractJavadocMojo.java}
else if ( SystemUtils.IS_OS_MAC_OSX )
{
javadocExe = new File( SystemUtils.getJavaHome() + File.separator +
"bin", javadocCommand );
}
{code}
But as of JDK 1.7 as distributed by Oracle, the default "else" block should
apply here (line 3538):
{code:title=AbstractJavadocMojo.java}
else
{
javadocExe =
new File( SystemUtils.getJavaHome() + File.separator + ".." +
File.separator + "bin", javadocCommand );
}
{code}
The solution might be to modify line 3534 as follows (or perhaps also check for
Oracle's vendor string as wellâanyway, you get the idea):
{code:title=AbstractJavadocMojo.java}
else if ( SystemUtils.IS_OS_MAC_OSX && SystemUtils.JAVA_VERSION_FLOAT <
1.7f )
{
javadocExe = new File( SystemUtils.getJavaHome() + File.separator +
"bin", javadocCommand );
}
{code}
Patch forthcoming.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)