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

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

Samples from our ASF CI
{noformat}
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 
2018-10-24T11:41:47-07:00)
Maven home: F:\jenkins\tools\maven\apache-maven-3.6.0\bin\..
Java version: 1.8.0_152, vendor: Oracle Corporation, runtime: 
f:\jenkins\tools\java\latest1.8\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows server 2016", version: "10.0", arch: "amd64", family: 
"windows"

Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 
2018-10-24T18:41:47Z)
Maven home: /home/jenkins/tools/maven/apache-maven-3.6.0
Java version: 1.7.0_80, vendor: Oracle Corporation, runtime: 
/usr/local/asfpackages/java/jdk1.7.0_80/jre
{noformat}

> 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)

Reply via email to