[
https://issues.apache.org/jira/browse/MESOS-8921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100891#comment-17100891
]
Matthieu Vergne commented on MESOS-8921:
----------------------------------------
Javadoc behaviour still present:
{code:none}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on
project <project name>: MavenReportException: Error while generating Javadoc:
Unable to find javadoc command: The environment variable JAVA_HOME is not
correctly set. -> [Help 1]
{code}
This happens on a {{mvn clean install}} command, so everything is fine until we
reach the Javadoc step.
> Autotools don't work with newer OpenJDK versions
> ------------------------------------------------
>
> Key: MESOS-8921
> URL: https://issues.apache.org/jira/browse/MESOS-8921
> Project: Mesos
> Issue Type: Bug
> Components: build
> Environment: RRs:
> # libjvm path: [https://reviews.apache.org/r/68610/]
> # Maven invocation: [https://reviews.apache.org/r/68611/]
> # Fix of javah: [https://reviews.apache.org/r/68612] &
> https://reviews.apache.org/r/68613
> Reporter: Kapil Arya
> Assignee: Kapil Arya
> Priority: Major
> Labels: autotools, ci, integration
> Fix For: 1.4.3, 1.5.2, 1.6.2, 1.7.0
>
>
> There are three distinct issues with modern Java and Linux versions:
> 1. Mesos configure script expects `libjvm.so` at
> `$JAVA_HOME/jre/lib/<arch>/server/libjvm.so`, but in the newer openjdk
> versions, `libjvm.so` is found at `$JAVA_HOME/lib/server/libjvm.so`.
> 2. On some distros (e.g., Ubuntu 18.04), JAVA_HOME env var might be missing.
> In such cases, the configure is able to compute it by looking at `java` and
> `javac` paths and succeeds. However, some maven plugins require JAVA_HOME to
> be set and could fail if it's not found.
> {code:java}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar
> (build-and-attach-javadocs) on project mesos: MavenReportException: Error
> while creating archive: Unable to find javadoc command: The environment
> variable JAVA_HOME is not correctly set. -> [Help 1]
> {code}
> Because configure scripts generate an automake variable `JAVA_HOME`, we can
> simply invoke maven in the following way to fix this issue:
> {code:java}
> JAVA_HOME=$JAVA_HOME mvn ...{code}
> These two behaviors were observed with OpenJDK 1.11 on Ubuntu 18.04 but I
> suspect that the behavior is present on other distros/OpenJDK versions.
> 3. `javah` has been removed as of OpenJDK 1.10. Instead `javac -h` is to be
> used as a replacement. See [http://openjdk.java.net/jeps/313] for more
> details.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)