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 2008/12/18 03:00:19 UTC
[jira] Updated: (MNG-3707) mvn script cannot compile sources which
use java 1.6 classes if JAVA_HOME is set
[ 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