Opened 11 years ago
Closed 5 years ago
#41876 closed defect (fixed)
maven-ant-tasks: Error: JAVA_HOME is not defined correctly.
Reported by: | ritchiecai@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | easye, root42, chrstphrchvz (Christopher Chavez) | |
Port: | maven-ant-tasks |
Description
Just upgraded to Mavericks, maven-ant-tasks failed while upgrading macport. here is the error:
:debug:build Executing org.macports.build (maven-ant-tasks) :debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_maven-ant-tasks/maven-ant-tasks/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9' HOME='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_maven-ant-tasks/maven-ant-tasks/work/home' :debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.1.3" && mvn package' :debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.1.3" && mvn package :info:build Error: JAVA_HOME is not defined correctly. :info:build We cannot execute /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.1.3" && mvn package :info:build Exit code: 1
I tried to clean and rebuild, it gives the same error. JAVE_HOME is defined:
echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk/Contents/Home /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk/Contents/Home
No idea how macport get /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home as JAVA_HOME, I never defined it anywhere.
Also:
mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500) Java version: 1.7.0_45 Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x" version: "10.9.1" arch: "x86_64" Family: "mac"
Change History (16)
comment:1 Changed 11 years ago by ritchiecai@…
comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | maven-ant-tasks JAVA_HOME removed |
---|---|
Owner: | changed from macports-tickets@… to ieure@… |
comment:4 Changed 11 years ago by larryv (Lawrence Velázquez)
Version: | 2.1.3 → 2.2.1 |
---|
comment:5 follow-up: 6 Changed 11 years ago by conradwt (Conrad Taylor)
Is there a patch which corrects this issue today because I'm seeing the same issue when I attempt to install the Leiningen port?
comment:6 Changed 11 years ago by ritchiecai@…
No, not that I know of. But if you want to install leiningen, just use the leiningen script , instead of using macport. Replying to conradwt@…:
Is there a patch which corrects this issue today because I'm seeing the same issue when I attempt to install the Leiningen port?
comment:7 Changed 11 years ago by aloklal99@…
2.2.1_3 is the version of maven2. The version of devel/maven-ant-tasks itself is 2.1.3
comment:8 Changed 10 years ago by chunfengd@…
I solved this after installing Apple's java: http://support.apple.com/kb/DL1572
comment:9 Changed 10 years ago by aoeumacports@…
Bump. Installing Apple's Java (1.6 rather than 1.8) is not a very nice fix. Is this port not being maintained? (sorry to be curt.)
comment:11 Changed 10 years ago by IvoClarysse (Ivo Clarysse)
Adding 'PortGroup java 1.0' to the maven-ant-tasks Portfile fixes the JAVA_HOME issue at hand (also with Java 1.8).
But then the build still fails later on with 'Specified destination directory cannot be created: /opt/local/var/macports/home/.m2/repository/org/apache/maven/maven-parent/19'
comment:13 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from ieure@… to macports-tickets@… |
---|
comment:14 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | arne.schmitz@… added |
---|---|
Summary: | maven-ant-tasks cannot find JAVA_HOME correctly → maven-ant-tasks: Error: JAVA_HOME is not defined correctly. |
Has duplicate #48851.
comment:15 Changed 5 years ago by chrstphrchvz (Christopher Chavez)
Cc: | chrstphrchvz added |
---|
comment:16 Changed 5 years ago by chrstphrchvz (Christopher Chavez)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Created a symbolic link to the actual JAVA_HOME, that stopped complaining about incorrect JAVA_HOME path, but it gives a new error: