You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sylwester Lachiewicz (JIRA)" <ji...@apache.org> on 2019/01/19 22:10:00 UTC

[jira] [Commented] (MNG-6501) Maven always picks the JRE path as java.home

    [ https://issues.apache.org/jira/browse/MNG-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747279#comment-16747279 ] 

Sylwester Lachiewicz commented on MNG-6501:
-------------------------------------------

 

 
{code:java}
set JAVA_HOME=\programs\java\jdk1.8.0_192
"c:\Program Files\java\jdk1.8.0_192\bin\java.exe" -Xmx2G -XX:TieredStopAtLevel=1 -noverify -XX:+TieredCompilation -classpath "c:\programs\apache-maven-3.6.0\bin\..\boot\plexus-classworlds-2.6.0.jar" "-Dclassworlds.conf=c:\programs\apache-maven-3.6.0\bin\..\bin\m2.conf" "-Dmaven.home=c:\programs\apache-maven-3.6.0\bin\.." "-Dlibrary.jansi.path=c:\programs\apache-maven-3.6.0\bin\..\lib\jansi-native" "-Dmaven.multiModuleProjectDirectory=C:\Users\xxxx" org.codehaus.plexus.classworlds.launcher.Launcher -v
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
Maven home: c:\programs\apache-maven-3.6.0\bin\..
Java version: 1.8.0_192, vendor: Oracle Corporation, runtime: c:\Program Files\java\jdk1.8.0_192\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
{code}
 

 

> Maven always picks the JRE path as java.home
> --------------------------------------------
>
>                 Key: MNG-6501
>                 URL: https://issues.apache.org/jira/browse/MNG-6501
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line, core
>    Affects Versions: 3.2.3
>            Reporter: Joseph
>            Assignee: Sylwester Lachiewicz
>            Priority: Minor
>             Fix For: waiting-for-feedback
>
>         Attachments: maven_jdk.png
>
>
> we set the proper JDK directory as JAVA_HOME in the environment variable. but the maven is forcefully picking up JRE_HOME.
> Even though the JAVA_HOME is pointing to the proper JDK path.
>  
> $ echo $JAVA_HOME
> */apps/dftjenkins/local/java/jdk1.8.0_102*
> $ ls -lrt ${JAVA_HOME}/bin/javac
> -rwxr-xr-x. 1 dftjenkins cisco 7941 Jun 22  2016 */apps/dftjenkins/local/java/jdk1.8.0_102/bin/javac*
> $ echo $M2_HOME
> /apps/dftjenkins/local/apache-maven/apache-maven-3.2.3
>  
> Maven is picking the JRE path as java.home
>  
> $ mvn -v
> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
> Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/apps/dftjenkins/jenkins_node/tmp
> Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T13:58:10-07:00)
> Maven home: /apps/dftjenkins/local/apache-maven/current
> Java version: 1.8.0_102, vendor: Oracle Corporation
> *Java home: /apps/dftjenkins/local/java/jdk1.8.0_102/jre*
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.10.0-693.11.6.el7.x86_64", arch: "amd64", family: "unix"
>  This issue impact the ant call from maven execution . because java.home is pointing to JRE_HOME and the ant compilation fails with 
>  
> [ERROR] Perhaps JAVA_HOME does not point to the JDK.
> [ERROR] It is currently set to "/apps/dftjenkins/local/java/jdk1.8.0_102/jre"
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)