Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.3.3
-
None
-
Solaris 10
Description
The $(cmd) idiom is used extensively in bin/mvn from lines 199-220, but this is not supported by older incarnations of /bin/sh (used on the shebang line). The `cmd` idiom is slightly more portable, and looks like it can probably be directly substituted.
find_maven_basedir() { local basedir=$(pwd) local wdir=$(pwd) while [ "$wdir" != '/' ] ; do wdir=$(cd "$wdir/.."; pwd) if [ -d "$wdir"/.mvn ] ; then basedir=$wdir break fi done echo "${basedir}" } # concatenates all lines of a file concat_lines() { if [ -f "$1" ]; then echo "$(tr -s '\n' ' ' < "$1")" fi } export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
See MNG-5658 for an earlier case of a similar problem.