Hello Björn,

no, the jdk installation is file. It does contain the jre subdirectory 
(`$JAVA_HOME/jre`).
The problem seems to be that Jenkins sets the `${java.home} system property to 
that jre subdirectory (`$JAVA_HOME/jre `) instead of the correct one 
(`$JAVA_HOME).
Then the maven-javadoc-plugin tries to find the `javadoc` executable under 
`${java.home}/bin` which fails, since `${java.home}` points to the wrong 
location.

See the error message:
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:jar (default-cli) on 
project XXX: MavenReportException: Error while generating Javadoc: Unable to 
find Javadoc command: The Javadoc executable 
‘/opt/oracle_jdk1.8.0_191/jre/bin/javadoc’ doesn’t exist or is not a file. 
Verify the <javadocExecutable/> parameter.
BR
Marco



Von: 'Björn Pedersen' via Jenkins Users <jenkinsci-users@googlegroups.com>
Gesendet: Donnerstag, 14. November 2019 09:12
An: Jenkins Users <jenkinsci-users@googlegroups.com>
Betreff: Re: How to force jenkins to use $JAVA_HOME/ instead of $JAVA_HOME/jre?

Hi,

Maybe this be a stripped down/incomplete jdk install. If looking into one of my 
jdk installs(manual install with oracle installer), there is a jre subdirectory 
 present.

Björn
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ca918127-f740-4463-b130-55686f6205e3%40googlegroups.com<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fjenkinsci-users%2Fca918127-f740-4463-b130-55686f6205e3%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=02%7C01%7Cmarco.herrn%40siemens.com%7Caf0de9c9cb164b6c88f708d768da5e6e%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C1%7C637093159405188715&sdata=MyzExtK4z%2FOO98eQ4D3D%2BdvzsK8UYUkBvlQYw%2B4NEBc%3D&reserved=0>.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR10MB3107FA407C0B2B8E5D14D40EE0710%40AM0PR10MB3107.EURPRD10.PROD.OUTLOOK.COM.

Reply via email to