This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch MNG-6914_2 in repository https://gitbox.apache.org/repos/asf/maven.git
commit f7ff3f5f1875e781c5ea4bb91bad5535f8407925 Author: Hervé Boutemy <hbout...@apache.org> AuthorDate: Sun Oct 10 23:35:06 2021 +0200 [MNG-6914] move apache-maven-wrapper to its own separate Maven module --- Jenkinsfile | 6 +++- Jenkinsfile.its | 2 +- .../pom.xml | 31 ++++++------------ .../src/assembly}/bin.xml | 2 +- .../src/assembly}/script.xml | 2 +- .../src/assembly}/shared.xml | 26 +++++++-------- .../src/assembly}/shared/download | 0 .../src/assembly}/shared/download.cmd | 0 .../shared/mvn/wrapper/maven-wrapper.properties | 0 .../src/assembly}/shared/mvnwDebug | 0 .../src/assembly}/shared/mvnwDebug.cmd | 0 .../src/assembly}/shared/mvnwlauncher | 0 .../src/assembly}/shared/mvnwlauncher.cmd | 0 .../src/assembly}/source.xml | 4 +-- .../source/mvn/wrapper/MavenWrapperDownloader.java | 0 .../src/site/apt/index.apt.vm | 38 +++++++++++++++++++--- .../src/site/site.xml | 24 +++++++------- apache-maven/pom.xml | 6 +--- maven-wrapper/src/site/apt/index.apt | 4 ++- pom.xml | 2 +- src/site/xdoc/index.xml | 2 +- 21 files changed, 84 insertions(+), 65 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 54b8652..15947ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,7 +63,10 @@ node(jenkinsEnv.nodeSelection(osNode)) { sh "mvn ${MAVEN_GOAL} -B -U -e -fae -V -Dmaven.test.failure.ignore=true -P versionlessMavenDist" } dir ('apache-maven/target') { - stash includes: 'apache-maven-bin.zip,apache-maven-wrapper-*.zip', name: 'maven-dist' + stash includes: 'apache-maven-bin.zip', name: 'maven-dist' + } + dir ('apache-maven-wrapper/target') { + stash includes: 'apache-maven-wrapper-*.zip', name: 'maven-wrapper-dist' } dir ('maven-wrapper/target') { stash includes: 'maven-wrapper.jar', name: 'wrapper-dist' @@ -102,6 +105,7 @@ for (String os in runITsOses) { } dir('dists') { unstash 'maven-dist' + unstash 'maven-wrapper-dist' unstash 'wrapper-dist' } try { diff --git a/Jenkinsfile.its b/Jenkinsfile.its index 5df3e2c..8258613 100644 --- a/Jenkinsfile.its +++ b/Jenkinsfile.its @@ -41,7 +41,7 @@ pipeline { git url: "https://github.com/apache/maven-integration-testing.git", branch: "${ITS_BRANCH}" sh "ls -lrt ${env.WORKSPACE}/apache-maven/target/" withEnv(["JAVA_HOME=${ tool "JDK 1.8 (latest)" }", "PATH+MAVEN=${tool 'Maven 3.6.3'}/bin:${env.JAVA_HOME}/bin"]) { - sh "mvn clean install -V -B -Prun-its,embedded -Dmaven.test.failure.ignore=true -Dmaven.repo.local=${env.WORKSPACE}/repo -DmavenDistro=${env.WORKSPACE}/apache-maven/target/apache-maven-bin.zip -DwrapperDistroDir=${env.WORKSPACE}/apache-maven/target -DmavenWrapper=${env.WORKSPACE}/maven-wrapper/target/maven-wrapper.jar" + sh "mvn clean install -V -B -Prun-its,embedded -Dmaven.test.failure.ignore=true -Dmaven.repo.local=${env.WORKSPACE}/repo -DmavenDistro=${env.WORKSPACE}/apache-maven/target/apache-maven-bin.zip -DwrapperDistroDir=${env.WORKSPACE}/apache-maven-wrapper/target -DmavenWrapper=${env.WORKSPACE}/maven-wrapper/target/maven-wrapper.jar" } } } diff --git a/apache-maven/maven-wrapper.pom b/apache-maven-wrapper/pom.xml similarity index 71% rename from apache-maven/maven-wrapper.pom rename to apache-maven-wrapper/pom.xml index 4396529..259bd88 100644 --- a/apache-maven/maven-wrapper.pom +++ b/apache-maven-wrapper/pom.xml @@ -31,7 +31,7 @@ under the License. <packaging>pom</packaging> <name>Apache Maven Wrapper Distribution</name> - <description>The Apache Maven Wrapper distribution in zip and tar.gz formats.</description> + <description>The Apache Maven Wrapper distribution zips in 3 types: script, bin and source.</description> <build> <pluginManagement> @@ -42,19 +42,11 @@ under the License. <configuration> <excludes combine.children="append"> <exclude>src/assembly/maven/bin/m2.conf</exclude> - <!-- these are partial scripts, resulting in mvn/mwnw scripts --> - <exclude>src/assembly/shared/init</exclude> - <exclude>src/assembly/shared/init.cmd</exclude> - <exclude>src/assembly/shared/mvnlauncher</exclude> - <exclude>src/assembly/shared/mvnlauncher.cmd</exclude> - <exclude>src/assembly/shared/mvnvalidate</exclude> - <exclude>src/assembly/shared/mvnvalidate.cmd</exclude> - <exclude>src/assembly/shared/run</exclude> - <exclude>src/assembly/shared/run.cmd</exclude> - <exclude>src/assembly/wrapper/shared/mvnwlauncher</exclude> - <exclude>src/assembly/wrapper/shared/mvnwlauncher.cmd</exclude> - <exclude>src/assembly/wrapper/shared/download</exclude> - <exclude>src/assembly/wrapper/shared/download.cmd</exclude> + <!-- these are partial scripts, resulting in mwnw scripts --> + <exclude>src/assembly/shared/mvnwlauncher</exclude> + <exclude>src/assembly/shared/mvnwlauncher.cmd</exclude> + <exclude>src/assembly/shared/download</exclude> + <exclude>src/assembly/shared/download.cmd</exclude> </excludes> </configuration> </plugin> @@ -81,9 +73,9 @@ under the License. </executions> <configuration> <descriptors> - <descriptor>src/assembly/wrapper/script.xml</descriptor> - <descriptor>src/assembly/wrapper/bin.xml</descriptor> - <descriptor>src/assembly/wrapper/source.xml</descriptor> + <descriptor>src/assembly/script.xml</descriptor> + <descriptor>src/assembly/bin.xml</descriptor> + <descriptor>src/assembly/source.xml</descriptor> </descriptors> </configuration> </plugin> @@ -103,7 +95,7 @@ under the License. <id>apache-release</id> <build> <plugins> - <!-- calculate checksums of source release for Apache dist area --> + <!-- calculate sha512 checksums --> <plugin> <groupId>net.nicoulaj.maven.plugins</groupId> <artifactId>checksum-maven-plugin</artifactId> @@ -121,11 +113,8 @@ under the License. <directory>${project.build.directory}</directory> <includes> <include>${project.artifactId}-${project.version}-bin.zip</include> - <include>${project.artifactId}-${project.version}-bin.tar.gz</include> <include>${project.artifactId}-${project.version}-script.zip</include> - <include>${project.artifactId}-${project.version}-script.tar.gz</include> <include>${project.artifactId}-${project.version}-source.zip</include> - <include>${project.artifactId}-${project.version}-source.tar.gz</include> </includes> </fileSet> </fileSets> diff --git a/apache-maven/src/assembly/wrapper/bin.xml b/apache-maven-wrapper/src/assembly/bin.xml similarity index 94% rename from apache-maven/src/assembly/wrapper/bin.xml rename to apache-maven-wrapper/src/assembly/bin.xml index 608c324..017bada 100644 --- a/apache-maven/src/assembly/wrapper/bin.xml +++ b/apache-maven-wrapper/src/assembly/bin.xml @@ -38,6 +38,6 @@ under the License. </dependencySet> </dependencySets> <componentDescriptors> - <componentDescriptor>src/assembly/wrapper/shared.xml</componentDescriptor> + <componentDescriptor>src/assembly/shared.xml</componentDescriptor> </componentDescriptors> </assembly> \ No newline at end of file diff --git a/apache-maven/src/assembly/wrapper/script.xml b/apache-maven-wrapper/src/assembly/script.xml similarity index 93% copy from apache-maven/src/assembly/wrapper/script.xml copy to apache-maven-wrapper/src/assembly/script.xml index 5ccd5f8..fec447b 100644 --- a/apache-maven/src/assembly/wrapper/script.xml +++ b/apache-maven-wrapper/src/assembly/script.xml @@ -28,6 +28,6 @@ under the License. </formats> <includeBaseDirectory>false</includeBaseDirectory> <componentDescriptors> - <componentDescriptor>src/assembly/wrapper/shared.xml</componentDescriptor> + <componentDescriptor>src/assembly/shared.xml</componentDescriptor> </componentDescriptors> </assembly> \ No newline at end of file diff --git a/apache-maven/src/assembly/wrapper/shared.xml b/apache-maven-wrapper/src/assembly/shared.xml similarity index 70% rename from apache-maven/src/assembly/wrapper/shared.xml rename to apache-maven-wrapper/src/assembly/shared.xml index 831c901..32a1694 100644 --- a/apache-maven/src/assembly/wrapper/shared.xml +++ b/apache-maven-wrapper/src/assembly/shared.xml @@ -23,23 +23,23 @@ under the License. xsi:schemaLocation="http://maven.apache.org/ASSEMBLY-COMPONENT/2.1.0 http://maven.apache.org/xsd/assembly-component-2.1.0.xsd"> <files> <file> - <source>src/assembly/wrapper/shared/mvnwDebug.cmd</source> + <source>src/assembly/shared/mvnwDebug.cmd</source> <outputDirectory>.</outputDirectory> <lineEnding>dos</lineEnding> </file> <file> - <source>src/assembly/wrapper/shared/mvnwDebug</source> + <source>src/assembly/shared/mvnwDebug</source> <outputDirectory>.</outputDirectory> <lineEnding>unix</lineEnding> <fileMode>0755</fileMode> </file> <file> <sources> - <source>src/assembly/shared/validate.cmd</source> - <source>src/assembly/shared/init.cmd</source> - <source>src/assembly/wrapper/shared/mvnwlauncher.cmd</source> - <source>src/assembly/wrapper/shared/download.cmd</source> - <source>src/assembly/shared/run.cmd</source> + <source>../apache-maven/src/assembly/shared/validate.cmd</source> + <source>../apache-maven/src/assembly/shared/init.cmd</source> + <source>src/assembly/shared/mvnwlauncher.cmd</source> + <source>src/assembly/shared/download.cmd</source> + <source>../apache-maven/src/assembly/shared/run.cmd</source> </sources> <destName>mvnw.cmd</destName> <outputDirectory>.</outputDirectory> @@ -48,11 +48,11 @@ under the License. </file> <file> <sources> - <source>src/assembly/shared/validate</source> - <source>src/assembly/shared/init</source> - <source>src/assembly/wrapper/shared/mvnwlauncher</source> - <source>src/assembly/wrapper/shared/download</source> - <source>src/assembly/shared/run</source> + <source>../apache-maven/src/assembly/shared/validate</source> + <source>../apache-maven/src/assembly/shared/init</source> + <source>src/assembly/shared/mvnwlauncher</source> + <source>src/assembly/shared/download</source> + <source>../apache-maven/src/assembly/shared/run</source> </sources> <destName>mvnw</destName> <outputDirectory>.</outputDirectory> @@ -63,7 +63,7 @@ under the License. </files> <fileSets> <fileSet> - <directory>src/assembly/wrapper/shared/mvn</directory> + <directory>src/assembly/shared/mvn</directory> <outputDirectory>.mvn</outputDirectory> <filtered>true</filtered> </fileSet> diff --git a/apache-maven/src/assembly/wrapper/shared/download b/apache-maven-wrapper/src/assembly/shared/download similarity index 100% rename from apache-maven/src/assembly/wrapper/shared/download rename to apache-maven-wrapper/src/assembly/shared/download diff --git a/apache-maven/src/assembly/wrapper/shared/download.cmd b/apache-maven-wrapper/src/assembly/shared/download.cmd similarity index 100% rename from apache-maven/src/assembly/wrapper/shared/download.cmd rename to apache-maven-wrapper/src/assembly/shared/download.cmd diff --git a/apache-maven/src/assembly/wrapper/shared/mvn/wrapper/maven-wrapper.properties b/apache-maven-wrapper/src/assembly/shared/mvn/wrapper/maven-wrapper.properties similarity index 100% rename from apache-maven/src/assembly/wrapper/shared/mvn/wrapper/maven-wrapper.properties rename to apache-maven-wrapper/src/assembly/shared/mvn/wrapper/maven-wrapper.properties diff --git a/apache-maven/src/assembly/wrapper/shared/mvnwDebug b/apache-maven-wrapper/src/assembly/shared/mvnwDebug similarity index 100% rename from apache-maven/src/assembly/wrapper/shared/mvnwDebug rename to apache-maven-wrapper/src/assembly/shared/mvnwDebug diff --git a/apache-maven/src/assembly/wrapper/shared/mvnwDebug.cmd b/apache-maven-wrapper/src/assembly/shared/mvnwDebug.cmd similarity index 100% rename from apache-maven/src/assembly/wrapper/shared/mvnwDebug.cmd rename to apache-maven-wrapper/src/assembly/shared/mvnwDebug.cmd diff --git a/apache-maven/src/assembly/wrapper/shared/mvnwlauncher b/apache-maven-wrapper/src/assembly/shared/mvnwlauncher similarity index 100% rename from apache-maven/src/assembly/wrapper/shared/mvnwlauncher rename to apache-maven-wrapper/src/assembly/shared/mvnwlauncher diff --git a/apache-maven/src/assembly/wrapper/shared/mvnwlauncher.cmd b/apache-maven-wrapper/src/assembly/shared/mvnwlauncher.cmd similarity index 100% rename from apache-maven/src/assembly/wrapper/shared/mvnwlauncher.cmd rename to apache-maven-wrapper/src/assembly/shared/mvnwlauncher.cmd diff --git a/apache-maven/src/assembly/wrapper/source.xml b/apache-maven-wrapper/src/assembly/source.xml similarity index 90% rename from apache-maven/src/assembly/wrapper/source.xml rename to apache-maven-wrapper/src/assembly/source.xml index 1fdc1e2..63f7a2b 100644 --- a/apache-maven/src/assembly/wrapper/source.xml +++ b/apache-maven-wrapper/src/assembly/source.xml @@ -28,11 +28,11 @@ under the License. </formats> <includeBaseDirectory>false</includeBaseDirectory> <componentDescriptors> - <componentDescriptor>src/assembly/wrapper/shared.xml</componentDescriptor> + <componentDescriptor>src/assembly/shared.xml</componentDescriptor> </componentDescriptors> <fileSets> <fileSet> - <directory>src/assembly/wrapper/source/mvn</directory> + <directory>src/assembly/source/mvn</directory> <outputDirectory>.mvn</outputDirectory> <filtered>true</filtered> </fileSet> diff --git a/apache-maven/src/assembly/wrapper/source/mvn/wrapper/MavenWrapperDownloader.java b/apache-maven-wrapper/src/assembly/source/mvn/wrapper/MavenWrapperDownloader.java similarity index 100% rename from apache-maven/src/assembly/wrapper/source/mvn/wrapper/MavenWrapperDownloader.java rename to apache-maven-wrapper/src/assembly/source/mvn/wrapper/MavenWrapperDownloader.java diff --git a/maven-wrapper/src/site/apt/index.apt b/apache-maven-wrapper/src/site/apt/index.apt.vm similarity index 50% copy from maven-wrapper/src/site/apt/index.apt copy to apache-maven-wrapper/src/site/apt/index.apt.vm index 42d71ca..5931d9a 100644 --- a/maven-wrapper/src/site/apt/index.apt +++ b/apache-maven-wrapper/src/site/apt/index.apt.vm @@ -16,13 +16,43 @@ ~~ under the License. ----- - Introduction + ${project.name} ----- Hervé Boutemy ----- - 2021-04-05 + 2021-10-10 ----- -Maven Wrapper +${project.name} - Maven Wrapper... \ No newline at end of file + ${project.description} + + Distributions types share the same base content: + + - <<<script>>> (default): contains only scripts that will download {{{../maven-wrapper/}<<<maven-wrapper.jar>>>}} with <<<wget>>> or <<<curl>>> on Unix or PowerShell on Windows: + +---- +mvnw +mvnw.cmd +mvnwDebug +mvnwDebug.cmd +.mvn/wrapper/maven-wrapper.properties +---- + + - <<<bin>>>: in addition to <<<scripts>>>, provides <<<maven-wrapper.jar>>> binary: + +---- +.mvn/wrapper/maven-wrapper.jar +---- + + - <<<source>>>: in addition to <<<scripts>>>, provides <<<MavenWrapperDownloader.java>>> source: + +---- +.mvn/wrapper/MavenWrapperDownloader.java +---- + + [] + + Distribution can be installed in a project either by unpacking zip archive by hand, or by using {{{/plugins/maven-wrapper-plugin/}<<<wrapper:wrapper>>>}}. + + \ No newline at end of file diff --git a/apache-maven/src/assembly/wrapper/script.xml b/apache-maven-wrapper/src/site/site.xml similarity index 58% rename from apache-maven/src/assembly/wrapper/script.xml rename to apache-maven-wrapper/src/site/site.xml index 5ccd5f8..cd7807c 100644 --- a/apache-maven/src/assembly/wrapper/script.xml +++ b/apache-maven-wrapper/src/site/site.xml @@ -9,7 +9,7 @@ to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an @@ -19,15 +19,13 @@ specific language governing permissions and limitations under the License. --> -<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> - <id>script</id> - <formats> - <format>zip</format> - </formats> - <includeBaseDirectory>false</includeBaseDirectory> - <componentDescriptors> - <componentDescriptor>src/assembly/wrapper/shared.xml</componentDescriptor> - </componentDescriptors> -</assembly> \ No newline at end of file +<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd"> + + <edit>${project.scm.url}</edit> + + <body> + <menu ref="parent"/> + <menu ref="reports"/> + </body> +</project> \ No newline at end of file diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml index 6436534..40cfb25 100644 --- a/apache-maven/pom.xml +++ b/apache-maven/pom.xml @@ -125,7 +125,7 @@ under the License. <configuration> <excludes combine.children="append"> <exclude>src/assembly/maven/bin/m2.conf</exclude> - <!-- these are partial scripts, resulting in mvn/mwnw scripts --> + <!-- these are partial scripts, resulting in mvn scripts --> <exclude>src/assembly/shared/init</exclude> <exclude>src/assembly/shared/init.cmd</exclude> <exclude>src/assembly/shared/mvnlauncher</exclude> @@ -134,10 +134,6 @@ under the License. <exclude>src/assembly/shared/mvnvalidate.cmd</exclude> <exclude>src/assembly/shared/run</exclude> <exclude>src/assembly/shared/run.cmd</exclude> - <exclude>src/assembly/wrapper/shared/mvnwlauncher</exclude> - <exclude>src/assembly/wrapper/shared/mvnwlauncher.cmd</exclude> - <exclude>src/assembly/wrapper/shared/download</exclude> - <exclude>src/assembly/wrapper/shared/download.cmd</exclude> </excludes> </configuration> </plugin> diff --git a/maven-wrapper/src/site/apt/index.apt b/maven-wrapper/src/site/apt/index.apt index 42d71ca..bf70504 100644 --- a/maven-wrapper/src/site/apt/index.apt +++ b/maven-wrapper/src/site/apt/index.apt @@ -25,4 +25,6 @@ Maven Wrapper - Maven Wrapper... \ No newline at end of file + Maven Wrapper dowloads Maven distribution if not already in cache, then launches Maven. + + It is called by {{{../apache-maven-wrapper/}<<<mvnw>>>/<<<mvnw.cmd>>> scripts}} that need to be installed in the project and called instead of <<<mvn>>>/<<<mvn.cmd>>>. diff --git a/pom.xml b/pom.xml index 49875c5..abc45a9 100644 --- a/pom.xml +++ b/pom.xml @@ -97,7 +97,7 @@ under the License. <module>maven-compat</module> <module>apache-maven</module> <!-- rename to apache-maven/maven.pom after RAT-268 --> <module>maven-wrapper</module> - <module>apache-maven/maven-wrapper.pom</module> + <module>apache-maven-wrapper</module> </modules> <scm> diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index af12e70..a00e276 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -42,7 +42,7 @@ under the License. <p> <img src="images/maven-deps.png" width="1046" height="784" border="0" usemap="#Maven_dependencies" /> <map name="Maven_dependencies"> - <area shape="rect" coords="433,1,658,41" alt="apache-maven-wrapper" href="apache-maven/" /> + <area shape="rect" coords="433,1,658,41" alt="apache-maven-wrapper" href="apache-maven-wrapper/" /> <area shape="rect" coords="711,0,959,40" alt="maven-wrapper-plugin" href="/plugins/maven-wrapper-plugin/" /> <area shape="rect" coords="488,67,604,107" alt="maven-wrapper" href="maven-wrapper/" /> <area shape="rect" coords="378,132,467,172" alt="maven-bom" href="maven-bom/" />