Use basedir location instead of "." to locate wrapper jar

The wrapper script has detected a .mvn directory, so it would be
better to assume that this is the location of the wrapper jar,
rather than the current directory (.). This change could be
enhanced by adding a separate detection loop for the jar itself
as opposed to the .mvn directory, but this is the smallest
possible change that fixes the bug.

Fixes gh-5
This commit is contained in:
Dave Syer 2015-07-16 12:13:08 +01:00 committed by rfscholte
parent ec3d0ccb90
commit 53eff03415
2 changed files with 2 additions and 2 deletions

2
maven-wrapper/mvnw vendored
View File

@ -228,7 +228,7 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "./.mvn/wrapper/maven-wrapper.jar" \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CMD_LINE_ARGS

View File

@ -118,7 +118,7 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar""
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%