Skip to content

Commit 4bf64b0

Browse files
Chris Westslachiewicz
authored andcommitted
[MJAVADOC-650] Fix javadoc binary search for JDK 9+.
Imported patch from Debian. In JDK 9 the jre directory was removed from the JDK so the lookup path should be modified. https://sources.debian.org/data/main/m/maven-javadoc-plugin/3.0.1-3/debian/patches/openjdk-9-javadoc-path.patch
1 parent c478a12 commit 4bf64b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,6 +3799,12 @@ else if ( SystemUtils.IS_OS_MAC_OSX && !JavaVersion.JAVA_SPECIFICATION_VERSION.i
37993799
{
38003800
javadocExe = new File( SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand );
38013801
}
3802+
// On Java 9, this has moved to: /usr/lib/jvm/java-9-openjdk-amd64/bin/javadoc
3803+
else if ( org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast( org.apache.commons.lang3.JavaVersion.JAVA_9 ) )
3804+
{
3805+
javadocExe =
3806+
new File( SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand );
3807+
}
38023808
else
38033809
{
38043810
javadocExe =

0 commit comments

Comments
 (0)