[
https://issues.apache.org/jira/browse/MNG-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Karl Heinz Marbaise updated MNG-6501:
-------------------------------------
Priority: Minor (was: Blocker)
> 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: core
> Affects Versions: 3.2.3
> Reporter: Joseph
> Priority: Minor
> 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)