Repository: maven Updated Branches: refs/heads/master cfd1fbe61 -> ad905af66
[MNG-5812] Project base dir not fully working in Cygwin Converted project base dir from Cygwin path to Windows path before executing Maven. Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/ad905af6 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/ad905af6 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/ad905af6 Branch: refs/heads/master Commit: ad905af669c7a8aea22151b56e14c941efdb55aa Parents: cfd1fbe Author: tssp <t...@web.de> Authored: Wed Apr 29 08:02:05 2015 +0200 Committer: Andreas Gudian <agud...@apache.org> Committed: Mon Jun 22 22:02:58 2015 +0200 ---------------------------------------------------------------------- apache-maven/src/bin/mvn | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/ad905af6/apache-maven/src/bin/mvn ---------------------------------------------------------------------- diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn index 902de4a..db0960b 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -57,27 +57,27 @@ case "`uname`" in # # Look for the Apple JDKs first to preserve the existing behaviour, and then look # for the new JDKs provided by Oracle. - # + # if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then # # Apple JDKs # export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home fi - + if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then # # Apple JDKs # export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home fi - + if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then # # Oracle JDKs # export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home - fi + fi if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then # @@ -216,10 +216,19 @@ concat_lines() { fi } -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" -# Provide a "standardized" way to retrieve the CLI args that will +# For Cygwin, switch project base directory path to Windows format before +# executing Maven. Otherwise this will cause Maven not to consider it. +if $cygwin; then + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +export MAVEN_PROJECTBASEDIR + +# Provide a "standardized" way to retrieve the CLI args that will # work with both Windows and non-Windows executions. MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" export MAVEN_CMD_LINE_ARGS