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