[ https://jira.codehaus.org/browse/MNG-5658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=358638#comment-358638 ]
Jonathan Sailor commented on MNG-5658: -------------------------------------- Well, `$(?)` is actually portable-- see http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03 in POSIX. It's possible that it was standardized in a sufficiently recent version of POSIX that the /bin/sh in Solaris 10 doesn't support it. The `[[ ? ]]` test in the preceding line is, however, non-standard. On a recent OpenIndiana build, /bin/sh is ksh93, and `man sh` does indicate support for `[[`, but I'd be far less surprised if it was added recently. My guess it is was some odd interaction between `[[` and `$(` which was causing a parse error. I submitted patches in MNG-5686 to change the /usr/libexec/java_home to use backticks *and* one to remove the bashisms, so we should be good in either case :) > Syntax error in bin/mvn on Solaris SPARC > ---------------------------------------- > > Key: MNG-5658 > URL: https://jira.codehaus.org/browse/MNG-5658 > Project: Maven > Issue Type: Bug > Affects Versions: 3.2.2 > Environment: Solaris SPARC 10 with Oracle JDK 1.7.0_60 > Reporter: Frank Langelage > Assignee: Jason van Zyl > Fix For: 3.2.3 > > Attachments: maven_bin_mvn.patch > > > The latest addition to bin/mvn breaks mvn running on Solaris. > Syntax error in line 86. > The Bourne shell /bin/sh does not understand this syntax with the brackets. > if [[ -z "$JAVA_HOME" && -x /usr/libexec/java_home ]] ; then > # > # Apple JDKs > # > export JAVA_HOME=$(/usr/libexec/java_home) > fi > ;; > changing the line with the assignment to > export JAVA_HOME=/usr/libexec/java_home > like the lines before makes it running again. -- This message was sent by Atlassian JIRA (v6.1.6#6162)