[ https://jira.codehaus.org/browse/MJAVADOC-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=345156#comment-345156 ]
Laird Nelson commented on MJAVADOC-394: --------------------------------------- For completeness, a workaround without changing code is to define the following in your {{$HOME/.mavenrc}} file (on OSX only, obviously): {code:lang=none} export JAVA_HOME=`/usr/libexec/java_home` {code} > 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 > Attachments: AbstractJavadocMojo.java.patch > > > 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)