You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/09/17 19:18:48 UTC
[maven-javadoc-plugin] branch MJAVADOC-650 updated (ea0ccf5 ->
a4aafab)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch MJAVADOC-650
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git.
discard ea0ccf5 [MJAVADOC-650] Add explainer for how java.home changed in Java 9
discard d680d7f [MJAVADOC-650] Fix javadoc for patch imported from Debian.
discard f4f29fd [MJAVADOC-650] Fix javadoc binary search for JDK 9+.
add e0fd05c Bump junit from 4.12 to 4.13
add 05872be Bump maven-invoker from 3.0.0 to 3.0.1
add c478a12 Bump mrm-maven-plugin from 1.1.0 to 1.2.0
new 4bf64b0 [MJAVADOC-650] Fix javadoc binary search for JDK 9+.
new d2953ba [MJAVADOC-650] Fix javadoc for patch imported from Debian.
new a4aafab [MJAVADOC-650] Add explainer for how java.home changed in Java 9
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (ea0ccf5)
\
N -- N -- N refs/heads/MJAVADOC-650 (a4aafab)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
pom.xml | 6 +++---
.../java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java | 6 ++++--
2 files changed, 7 insertions(+), 5 deletions(-)
[maven-javadoc-plugin] 03/03: [MJAVADOC-650] Add explainer for how
java.home changed in Java 9
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MJAVADOC-650
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
commit a4aafaba9b5f2e409fc04b74b19c81ad4583106f
Author: Evan Ward <ev...@nrl.navy.mil>
AuthorDate: Thu Sep 17 08:35:14 2020 -0400
[MJAVADOC-650] Add explainer for how java.home changed in Java 9
Closes #60
---
.../maven/plugins/javadoc/AbstractJavadocMojo.java | 39 +++++++++++++++++++---
1 file changed, 34 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index cb21c12..040e1ca 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -135,6 +135,7 @@ import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
+import static org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast;
import static org.apache.maven.plugins.javadoc.JavadocUtil.toRelative;
import static org.apache.maven.plugins.javadoc.JavadocUtil.toList;
import static org.apache.maven.plugins.javadoc.JavadocUtil.isEmpty;
@@ -3780,13 +3781,41 @@ public abstract class AbstractJavadocMojo
return javadocExe.getAbsolutePath();
}
-
+ // CHECKSTYLE_OFF: LineLength
// ----------------------------------------------------------------------
// Try to find javadocExe from System.getProperty( "java.home" )
- // By default, System.getProperty( "java.home" ) = JRE_HOME and JRE_HOME
- // should be in the JDK_HOME
+ // "java.home" is the "Installation directory for Java Runtime
+ // Environment (JRE)" used to run this code. I.e. it is the parent of
+ // the directory containing the `java` command used to start this
+ // application. It does not necessarily have any relation to the
+ // environment variable JAVA_HOME.
+ //
+ // In Java 8 and below the JRE is separate from the JDK. When
+ // installing the JDK to my-dir/ the javadoc command is installed in
+ // my-dir/bin/javadoc, the JRE is installed to my-dir/jre, and hence
+ // the java command is installed to my-dir/jre/bin/java. In this
+ // configuration "java.home" is mydir/jre/, threfore the relative path
+ // to the javadoc command is ../bin/javadoc.
+ //
+ // In Java 9 and above the JRE is no longer in a subdirectory of the
+ // JDK, i.e. the JDK and the JDK are merged. In this case the java
+ // command is installed to my-dir/bin/java along side the javadoc
+ // command. So the relative path from "java.home" to the javadoc
+ // command is bin/javadoc.
+ //
+ // References
+ //
+ // "System Properties" in "The Java Tutorials"
+ // https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
+ //
+ // "Changes to the Installed JDK/JRE Image" in "JDK 9 Migration Guide"
+ // https://docs.oracle.com/javase/9/migrate/toc.htm?xd_co_f=122a7174-9132-4acd-b122-fac02f8c4fef#JSMIG-GUID-D867DCCC-CEB5-4AFA-9D11-9C62B7A3FAB1
+ //
+ // "JEP 220: Modular Run-Time Images"
+ // http://openjdk.java.net/jeps/220
// ----------------------------------------------------------------------
// For IBM's JDK 1.2
+ // CHECKSTYLE_ON: LineLength
if ( SystemUtils.IS_OS_AIX )
{
javadocExe =
@@ -3799,14 +3828,14 @@ public abstract class AbstractJavadocMojo
{
javadocExe = new File( SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand );
}
- // On Java 9 the jre subdirectory was removed from the JDK
- else if ( org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast( org.apache.commons.lang3.JavaVersion.JAVA_9 ) )
+ else if ( isJavaVersionAtLeast( org.apache.commons.lang3.JavaVersion.JAVA_9 ) )
{
javadocExe =
new File( SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand );
}
else
{
+ // Java <= 8
javadocExe =
new File( SystemUtils.getJavaHome() + File.separator + ".." + File.separator + "bin", javadocCommand );
}
[maven-javadoc-plugin] 01/03: [MJAVADOC-650] Fix javadoc binary
search for JDK 9+.
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MJAVADOC-650
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
commit 4bf64b028aae8793e6488b66d10ffa596e031e62
Author: Chris West <so...@goeswhere.com>
AuthorDate: Thu Sep 10 14:31:18 2020 -0400
[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
---
.../java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index 3c847ce..dc0477d 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -3799,6 +3799,12 @@ public abstract class AbstractJavadocMojo
{
javadocExe = new File( SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand );
}
+ // On Java 9, this has moved to: /usr/lib/jvm/java-9-openjdk-amd64/bin/javadoc
+ else if ( org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast( org.apache.commons.lang3.JavaVersion.JAVA_9 ) )
+ {
+ javadocExe =
+ new File( SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand );
+ }
else
{
javadocExe =
[maven-javadoc-plugin] 02/03: [MJAVADOC-650] Fix javadoc for patch
imported from Debian.
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MJAVADOC-650
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
commit d2953bac69ff6e7e935ba798bcdc8d60693d75c7
Author: Evan Ward <ev...@nrl.navy.mil>
AuthorDate: Thu Sep 10 14:36:12 2020 -0400
[MJAVADOC-650] Fix javadoc for patch imported from Debian.
---
src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index dc0477d..cb21c12 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -3799,7 +3799,7 @@ public abstract class AbstractJavadocMojo
{
javadocExe = new File( SystemUtils.getJavaHome() + File.separator + "bin", javadocCommand );
}
- // On Java 9, this has moved to: /usr/lib/jvm/java-9-openjdk-amd64/bin/javadoc
+ // On Java 9 the jre subdirectory was removed from the JDK
else if ( org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast( org.apache.commons.lang3.JavaVersion.JAVA_9 ) )
{
javadocExe =