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
3848a47385
commit
6cf17fd8fa
|
@ -81,7 +81,7 @@ under the License.
|
|||
</executions>
|
||||
<configuration>
|
||||
<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/source.xml</descriptor>
|
||||
</descriptors>
|
||||
|
|
|
@ -17,6 +17,6 @@ export MAVEN_CMD_LINE_ARGS
|
|||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath ${LAUNCHER_JAR} \
|
||||
-classpath "${LAUNCHER_JAR}" \
|
||||
$MAVENHOME_CONFIG "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
$MAVEN_LAUNCHER "$@"
|
||||
|
|
|
@ -12,10 +12,6 @@ else
|
|||
fi
|
||||
|
||||
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
|
||||
jarUrl="$MVNW_REPOURL/org/apache/maven/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar"
|
||||
|
|
|
@ -8,10 +8,6 @@ goto endWrapper
|
|||
:downloadWrapper
|
||||
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%" == "" (
|
||||
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
|
||||
# under the License.
|
||||
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 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 "%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 ...
|
||||
@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
|
||||
@REM End of extension
|
||||
|
|
Loading…
Reference in New Issue