Index: maven-core/src/bin/mvn =================================================================== --- maven-core/src/bin/mvn (revision 356626) +++ maven-core/src/bin/mvn (working copy) @@ -29,8 +29,10 @@ # OS specific support. $var _must_ be set to either true or false. cygwin=false; darwin=false; +mingw=false case "`uname`" in CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; Darwin*) darwin=true if [ -z "$JAVA_VERSION" ] ; then JAVA_VERSION="CurrentJDK" @@ -88,6 +90,15 @@ CLASSPATH=`cygpath --path --unix "$CLASSPATH"` fi +# For Migwn, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + if [ -z "$JAVACMD" ] ; then if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then