You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2007/01/21 23:29:21 UTC

[jira] Moved: (SUREFIRE-209) JVM forked during tests does not use "java.home"

     [ http://jira.codehaus.org/browse/SUREFIRE-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter moved MSUREFIRE-154 to SUREFIRE-209:
-------------------------------------------------

        Key: SUREFIRE-209  (was: MSUREFIRE-154)
    Project: Maven Surefire  (was: Maven 2.x Surefire Plugin)

> JVM forked during tests does not use "java.home"
> ------------------------------------------------
>
>                 Key: SUREFIRE-209
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-209
>             Project: Maven Surefire
>          Issue Type: Bug
>         Environment: Ubuntu Dapper, Sun JDKs (many versions), Maven 2.0.4
>            Reporter: Simone Bordet 
>         Assigned To: Carlos Sanchez
>
> Maven script "mvn" uses JAVA_HOME to figure out the JDK. However, when running the tests, Maven forks the JVM just using the "java" command. Most of the times, the "java" interpreter in the PATH is not the one used for the build or referenced by JAVA_HOME (in Linux distros, it often points to GNU ClassPath).
> Normally, the JDK used for the build is also the JDK one wants to run the tests.
> I am suggesting that the forked JVM for the tests should use the "java.home" system property of the JVM used for the build, and then append "java" and all the classpath of the tests.
> I think this will be most useful to people that develops using different JDKs.
> Maven 2.0.4 excerpt:
> > mvn -X
> ...
> [INFO] Surefire report directory: /home/simon/opensource/maven/target/surefire-reports
> Forking command line: java -classpath /home/simon/.m2/repository/org/apache/maven/surefire/surefire-api/2.0/surefire-api-2.0.jar:/home/simon/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar:/home/simon/.m2/repository/org/apache/maven/surefire/surefire-booter/2.0/surefire-booter-2.0.jar org.apache.maven.surefire.booter.SurefireBooter /tmp/surefire58883tmp /tmp/surefire58884tmp
> ...
> The above should read, after "Forking command line:", if JAVA_HOME=/usr/local/jdk150:
> /usr/local/jdk150/bin/java -classpath ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira