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

View: New views
4 Messages — Rating Filter:   Alert me  

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

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ 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] Commented: (MNG-3707) mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ 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] Updated: (MNG-3707) mvn script cannot compile sources which use java 1.6 classes if JAVA_HOME is set

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ 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