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 McCallister (JIRA)" <ji...@codehaus.org> on 2008/08/13 19:32:26 UTC

[jira] Created: (MNG-3707) mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set

mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set
--------------------------------------------------------------------------------

                 Key: MNG-3707
                 URL: http://jira.codehaus.org/browse/MNG-3707
             Project: Maven 2
          Issue Type: Bug
          Components: Command Line
            Reporter: Brian McCallister


The section of the mvn script:

  Darwin*) darwin=true 
           if [ -z "$JAVA_VERSION" ] ; then
             JAVA_VERSION="CurrentJDK"
           else
             echo "Using Java version: $JAVA_VERSION"
           fi
           if [ -z "$JAVA_HOME" ] ; then
             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
           fi
           ;;

ignores JAVA_VERSION if JAVA_HOME is set. This would be fine if it would compile against the version of java specified in JAVA_HOME, but it doesn't it compiles against the value pointed at by the /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK symlink, which is always 1.5 (even if you change java version so that the /System/Library/Frameworks/JavaVM.framework/Versions/Current symlink is updated by the OS).

I would prefer maven respect JAVA_HOME, but will take anything that allows me to leave JAVA_HOME set and still be able to compile things :-)

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

        

[jira] Commented: (MNG-3707) mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set

Posted by "Brian McCallister (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144949#action_144949 ] 

Brian McCallister commented on MNG-3707:
----------------------------------------

setting JAVA_HOME to the full /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home instead of /Library/Java/Home and using the mac symlinks is a workaround

> mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set
> --------------------------------------------------------------------------------
>
>                 Key: MNG-3707
>                 URL: http://jira.codehaus.org/browse/MNG-3707
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>            Reporter: Brian McCallister
>
> The section of the mvn script:
>   Darwin*) darwin=true 
>            if [ -z "$JAVA_VERSION" ] ; then
>              JAVA_VERSION="CurrentJDK"
>            else
>              echo "Using Java version: $JAVA_VERSION"
>            fi
>            if [ -z "$JAVA_HOME" ] ; then
>              JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
>            fi
>            ;;
> ignores JAVA_VERSION if JAVA_HOME is set. This would be fine if it would compile against the version of java specified in JAVA_HOME, but it doesn't it compiles against the value pointed at by the /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK symlink, which is always 1.5 (even if you change java version so that the /System/Library/Frameworks/JavaVM.framework/Versions/Current symlink is updated by the OS).
> I would prefer maven respect JAVA_HOME, but will take anything that allows me to leave JAVA_HOME set and still be able to compile things :-)

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

        

[jira] Closed: (MNG-3707) mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed MNG-3707.
-----------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 2.2.x (to be reviewed))

I think the workaround is good enough here, especially with most Mac devs on Snow Leopard now only having 1.6!

> mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set
> --------------------------------------------------------------------------------
>
>                 Key: MNG-3707
>                 URL: http://jira.codehaus.org/browse/MNG-3707
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>            Reporter: Brian McCallister
>
> The section of the mvn script:
>   Darwin*) darwin=true 
>            if [ -z "$JAVA_VERSION" ] ; then
>              JAVA_VERSION="CurrentJDK"
>            else
>              echo "Using Java version: $JAVA_VERSION"
>            fi
>            if [ -z "$JAVA_HOME" ] ; then
>              JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
>            fi
>            ;;
> ignores JAVA_VERSION if JAVA_HOME is set. This would be fine if it would compile against the version of java specified in JAVA_HOME, but it doesn't it compiles against the value pointed at by the /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK symlink, which is always 1.5 (even if you change java version so that the /System/Library/Frameworks/JavaVM.framework/Versions/Current symlink is updated by the OS).
> I would prefer maven respect JAVA_HOME, but will take anything that allows me to leave JAVA_HOME set and still be able to compile things :-)

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

        

[jira] Commented: (MNG-3707) mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set

Posted by "Brian McCallister (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144948#action_144948 ] 

Brian McCallister commented on MNG-3707:
----------------------------------------

This is probably actually a mac bug, trying to trace through the maze of symlinks is a nightmare

> mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set
> --------------------------------------------------------------------------------
>
>                 Key: MNG-3707
>                 URL: http://jira.codehaus.org/browse/MNG-3707
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>            Reporter: Brian McCallister
>
> The section of the mvn script:
>   Darwin*) darwin=true 
>            if [ -z "$JAVA_VERSION" ] ; then
>              JAVA_VERSION="CurrentJDK"
>            else
>              echo "Using Java version: $JAVA_VERSION"
>            fi
>            if [ -z "$JAVA_HOME" ] ; then
>              JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
>            fi
>            ;;
> ignores JAVA_VERSION if JAVA_HOME is set. This would be fine if it would compile against the version of java specified in JAVA_HOME, but it doesn't it compiles against the value pointed at by the /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK symlink, which is always 1.5 (even if you change java version so that the /System/Library/Frameworks/JavaVM.framework/Versions/Current symlink is updated by the OS).
> I would prefer maven respect JAVA_HOME, but will take anything that allows me to leave JAVA_HOME set and still be able to compile things :-)

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

        

[jira] Updated: (MNG-3707) mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3707:
------------------------------

    Fix Version/s: 2.0.x

> mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set
> --------------------------------------------------------------------------------
>
>                 Key: MNG-3707
>                 URL: http://jira.codehaus.org/browse/MNG-3707
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>            Reporter: Brian McCallister
>             Fix For: 2.0.x
>
>
> The section of the mvn script:
>   Darwin*) darwin=true 
>            if [ -z "$JAVA_VERSION" ] ; then
>              JAVA_VERSION="CurrentJDK"
>            else
>              echo "Using Java version: $JAVA_VERSION"
>            fi
>            if [ -z "$JAVA_HOME" ] ; then
>              JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
>            fi
>            ;;
> ignores JAVA_VERSION if JAVA_HOME is set. This would be fine if it would compile against the version of java specified in JAVA_HOME, but it doesn't it compiles against the value pointed at by the /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK symlink, which is always 1.5 (even if you change java version so that the /System/Library/Frameworks/JavaVM.framework/Versions/Current symlink is updated by the OS).
> I would prefer maven respect JAVA_HOME, but will take anything that allows me to leave JAVA_HOME set and still be able to compile things :-)

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