You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jochen Wiedmann (JIRA)" <ji...@apache.org> on 2016/10/28 07:29:58 UTC

[jira] [Created] (MNG-6108) Maven selects wrong JVM

Jochen Wiedmann created MNG-6108:
------------------------------------

             Summary: Maven selects wrong JVM
                 Key: MNG-6108
                 URL: https://issues.apache.org/jira/browse/MNG-6108
             Project: Maven
          Issue Type: Bug
          Components: Command Line
    Affects Versions: 3.3.9
         Environment: Windows 7, Java 8
            Reporter: Jochen Wiedmann
            Priority: Minor



Hi,

I am using Mavn 3.3.9:

    $ which mvn
    /d/opt/apache-maven-3.3.9/bin/mvn

I intend to use an installed SDK 1.8.0_102:

$ which mvn
/d/opt/apache-maven-3.3.9/bin/mvn

    $ echo $JAVA_HOME
    d:/opt/jdk1.8.0_102
    $ which java
    /d/opt/jdk1.8.0_102/bin/java

Nevertheless, Maven is constantly using Java 1.8.0_111. Which is a problem, because that is a JRE, and not an SDK:

    $ mvn -Pjenkins -U clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Ant Plugin 1.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6:clean (default-clean) @ ant ---
[INFO] Deleting D:\Users\JochenWiedmann\git\jenkins\ant-plugin\target
[INFO]
[INFO] --- maven-hpi-plugin:1.120:validate (default-validate) @ ant ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:display-info (display-info) @ ant ---
[INFO] Maven Version: 3.3.9
[INFO] JDK Version: 1.8.0_111 normalized as: 1.8.0-111


    $ java -version
    java version "1.8.0_111"
    Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

The problem is perhaps understandable, if you look at this:

    $ /d/opt/jdk1.8.0_102/bin/java -version
    java version "1.8.0_111"
    Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

But, anyways: How can I lock down the JVM, that Maven is using?







--
This message was sent by Atlassian JIRA
(v6.3.4#6332)