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

[jira] Closed: (MNG-2376) Have Java code output Java version, not the shell script

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

Brian Fox closed MNG-2376.
--------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.2.x)
                   2.0.7

$ mvn --version
Maven version: 2.0.7-SNAPSHOT
Java version: 1.5.0_11
OS Name: "windows xp" Version: "5.1" Arch: "x86"

> Have Java code output Java version, not the shell script
> --------------------------------------------------------
>
>                 Key: MNG-2376
>                 URL: http://jira.codehaus.org/browse/MNG-2376
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Command Line
>    Affects Versions: 2.0.4
>         Environment: Mac OS X 10.4
>            Reporter: David Smiley
>            Assignee: Brian Fox
>            Priority: Minor
>             Fix For: 2.0.7
>
>
> The shell script outputs $JAVA_VERSION.  In my case, in an ill-fated attempt to get maven to use JDK 1.4, this was set to 1.4 but JAVA_HOME was already set (in .profile or wherever)  to that of the current JDK (1.5).  So it is inconsistent and led me on a wild goose chase to track down a problem.  If Maven is going to output the java version, do it from java code using the right system property.  Only use JAVA_VERSION to help select a JAVA_HOME, if JAVA_HOME isn't set.
> Perhaps there is some standard approach to this sort of thing but I am unsure.

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