mirror of https://github.com/apache/maven.git
[MNG-6919] drop wrapperUrl from maven-wrapper.properties
Ensure maven-wrapper can handle spaced paths
This commit is contained in:
parent
c1ee195570
commit
66f795476b
|
@ -81,7 +81,7 @@ under the License.
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<descriptors>
|
<descriptors>
|
||||||
<descriptor>src/assembly/wrapper//script.xml</descriptor>
|
<descriptor>src/assembly/wrapper/script.xml</descriptor>
|
||||||
<descriptor>src/assembly/wrapper/bin.xml</descriptor>
|
<descriptor>src/assembly/wrapper/bin.xml</descriptor>
|
||||||
<descriptor>src/assembly/wrapper/source.xml</descriptor>
|
<descriptor>src/assembly/wrapper/source.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
|
|
|
@ -17,6 +17,6 @@ export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
exec "$JAVACMD" \
|
exec "$JAVACMD" \
|
||||||
$MAVEN_OPTS \
|
$MAVEN_OPTS \
|
||||||
-classpath ${LAUNCHER_JAR} \
|
-classpath "${LAUNCHER_JAR}" \
|
||||||
$MAVENHOME_CONFIG "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
$MAVENHOME_CONFIG "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
$MAVEN_LAUNCHER "$@"
|
$MAVEN_LAUNCHER "$@"
|
||||||
|
|
|
@ -12,10 +12,6 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
||||||
while IFS="=" read key value; do
|
|
||||||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
|
||||||
esac
|
|
||||||
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
|
|
||||||
|
|
||||||
if [ -n "$MVNW_REPOURL" ]; then
|
if [ -n "$MVNW_REPOURL" ]; then
|
||||||
jarUrl="$MVNW_REPOURL/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
jarUrl="$MVNW_REPOURL/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
||||||
|
|
|
@ -8,10 +8,6 @@ goto endWrapper
|
||||||
:downloadWrapper
|
:downloadWrapper
|
||||||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
||||||
|
|
||||||
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
|
||||||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
|
||||||
)
|
|
||||||
|
|
||||||
if not "%MVNW_REPOURL%" == "" (
|
if not "%MVNW_REPOURL%" == "" (
|
||||||
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
||||||
)
|
)
|
||||||
|
|
|
@ -15,4 +15,3 @@
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${project.version}/apache-maven-${project.version}-bin.zip
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${project.version}/apache-maven-${project.version}-bin.zip
|
||||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
@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.
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
|
||||||
SET javaClass=%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\MavenWrapperDownloader.java
|
SET javaClass="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\MavenWrapperDownloader.java"
|
||||||
IF EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\MavenDownloader.class" goto :runDownloader
|
IF EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\MavenDownloader.class" goto :runDownloader
|
||||||
|
|
||||||
if "%MVNW_VERBOSE%" == "true" echo - Compiling MavenWrapperDownloader.java ...
|
if "%MVNW_VERBOSE%" == "true" echo - Compiling MavenWrapperDownloader.java ...
|
||||||
|
@ -14,7 +14,7 @@ IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\MavenWrapperDownloader.class"
|
||||||
|
|
||||||
if "%MVNW_VERBOSE%" == "true" echo - Running MavenWrapperDownloader.class ...
|
if "%MVNW_VERBOSE%" == "true" echo - Running MavenWrapperDownloader.class ...
|
||||||
@REM Running the downloader
|
@REM Running the downloader
|
||||||
"%JAVA_HOME%\bin\java" -cp .mvn\wrapper MavenWrapperDownloader "%MAVEN_PROJECTBASEDIR%"
|
"%JAVA_HOME%\bin\java" -cp "%MAVEN_PROJECTBASEDIR%\.mvn\wrapper" MavenWrapperDownloader "%MAVEN_PROJECTBASEDIR%"
|
||||||
|
|
||||||
:endWrapper
|
:endWrapper
|
||||||
@REM End of extension
|
@REM End of extension
|
||||||
|
|
Loading…
Reference in New Issue