You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tom Mueller (JIRA)" <ji...@codehaus.org> on 2013/01/14 23:45:13 UTC

[jira] (MNG-5423) mvn shell script doesn't always export JAVA_HOME

Tom Mueller created MNG-5423:
--------------------------------

             Summary: mvn shell script doesn't always export JAVA_HOME
                 Key: MNG-5423
                 URL: https://jira.codehaus.org/browse/MNG-5423
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Command Line
    Affects Versions: 3.0.4, 3.1.0
            Reporter: Tom Mueller


There are code paths through the mvn shell script that do not result in JAVA_HOME being exported if it is not set when entering the script. 

I found this in 3.0.4 on MacOS X. JAVA_HOME gets set at line 117, but then is never exported, so the java process doesn't get the value. Based on reading the code, I see other paths through the script where JAVA_HOME is not exported even though it gets set by the script. 

On the head, there are statements like the following (line 65):

export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home

This is not valid /bin/sh syntax.  /bin/sh does not allow the export to be on the same line where the environment variable is set. There are also paths on the head where JAVA_HOME is not exported when it is set. 


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira