mirror of https://github.com/apache/maven.git
- Added a download extension for windows
This commit is contained in:
parent
d14aa05699
commit
5aa0e6fa9d
|
@ -204,7 +204,6 @@ fi
|
||||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
JAR_URL="http://central.maven.org/maven2/io/takari/maven-wrapper/0.2.1/maven-wrapper-0.2.1.jar"
|
JAR_URL="http://central.maven.org/maven2/io/takari/maven-wrapper/0.2.1/maven-wrapper-0.2.1.jar"
|
||||||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||||
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||||
|
@ -233,7 +232,6 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# End of extension
|
# End of extension
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
|
@ -121,6 +121,17 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
if exist .mvn/wrapper/maven-wrapper.jar (
|
||||||
|
echo Found .mvn/wrapper/maven-wrapper.jar
|
||||||
|
) else (
|
||||||
|
echo Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ...
|
||||||
|
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://central.maven.org/maven2/io/takari/maven-wrapper/0.2.1/maven-wrapper-0.2.1.jar', '.mvn/wrapper/maven-wrapper.jar')"
|
||||||
|
echo Finished downloading .mvn/wrapper/maven-wrapper.jar
|
||||||
|
)
|
||||||
|
@REM End of extension
|
||||||
|
|
||||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
if ERRORLEVEL 1 goto error
|
if ERRORLEVEL 1 goto error
|
||||||
goto end
|
goto end
|
||||||
|
|
Loading…
Reference in New Issue