From issues-return-100153-apmail-maven-issues-archive=maven.apache.org@maven.apache.org Thu Jan 29 00:29:44 2015 Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 289AA10320 for ; Thu, 29 Jan 2015 00:29:44 +0000 (UTC) Received: (qmail 80233 invoked by uid 500); 29 Jan 2015 00:29:44 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 80177 invoked by uid 500); 29 Jan 2015 00:29:44 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 80166 invoked by uid 99); 29 Jan 2015 00:29:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 00:29:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [199.193.192.100] (HELO codehaus01.managed.contegix.com) (199.193.192.100) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 00:29:19 +0000 Received: from codehaus01 (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 34105B118B for ; Wed, 28 Jan 2015 18:29:18 -0600 (CST) Date: Wed, 28 Jan 2015 18:29:18 -0600 (CST) From: "Scott Carey (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (MNG-5686) mvn cannot execute /usr/libexec/java_home/bin/java on OS X. MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 22cf62d5d84cf5bea94eb3b65e0ebd09 X-Virus-Checked: Checked by ClamAV on apache.org [ https://jira.codehaus.org/browse/MNG-5686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=361988#comment-361988 ] Scott Carey commented on MNG-5686: ---------------------------------- excellent. Any idea how far out 3.2.6 is ? :) > mvn cannot execute /usr/libexec/java_home/bin/java on OS X. > ----------------------------------------------------------- > > Key: MNG-5686 > URL: https://jira.codehaus.org/browse/MNG-5686 > Project: Maven > Issue Type: Bug > Components: Command Line > Affects Versions: 3.2.3 > Environment: Mac OS X 10.9.4 > Reporter: Takayoshi Fujiki > Assignee: Mirko Friedenhagen > Fix For: 3.2.6 > > Attachments: 0001-Fix-whitespace-bashisms-in-mvn-shell-scripts.patch, 0001-Fix-whitespace-bashisms-in-mvn-shell-scripts.v2.patch, 0002-MNG-5686-detect-JAVA_HOME-on-newer-OSX-again.patch, maven-bin-mvn.patch > > > From 3.2.3, mvn cannot start and outputs the following error. > {code} > $ ./apache-maven-3.2.3/bin/mvn -version > Error: JAVA_HOME is not defined correctly. > We cannot execute /usr/libexec/java_home/bin/java > {code} > 3.2.2 doesn't have this problem. > {code} > $ ./apache-maven-3.2.2/bin/mvn -version > Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T22:51:42+09:00) > Maven home: /Users/xxx/tmp/apache-maven-3.2.2 > Java version: 1.8.0_11, vendor: Oracle Corporation > Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac" > {code} > When I modified {{bin/mvn}} like the following, this problem was gone. > {code} > --- bin/mvn.orig 2014-09-10 03:33:52.000000000 +0900 > +++ bin/mvn 2014-09-10 03:34:18.000000000 +0900 > @@ -83,7 +83,7 @@ > # > # Apple JDKs > # > - export JAVA_HOME=/usr/libexec/java_home > + export JAVA_HOME="`/usr/libexec/java_home`" > fi > ;; > esac > {code} > Maybe MNG-5658 is related to this problem. {{/usr/libexec/java_home}} is a command([java_home(1)|https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/java_home.1.html]), and {{$(command)}} is a style of [Command Substitution|http://www.tldp.org/LDP/abs/html/commandsub.html] (Another(old) style is {{`command`}}). > So removing "$()" breaks the JAVA_HOME detection on OS X. -- This message was sent by Atlassian JIRA (v6.1.6#6162)