tag | 2f29282d18db408f364b115e0d257a7352b6c978 | |
---|---|---|
tagger | Manfred Moser <manfred@simpligility.com> | Mon Apr 17 14:45:05 2017 -0700 |
object | 8297d58cef5c0bffe44261d934fe9e5e434d24b1 |
[maven-release-plugin] copy for tag maven-wrapper-0.2.0
commit | 8297d58cef5c0bffe44261d934fe9e5e434d24b1 | [log] [tgz] |
---|---|---|
author | Manfred Moser <manfred@simpligility.com> | Mon Apr 17 14:45:05 2017 -0700 |
committer | Manfred Moser <manfred@simpligility.com> | Mon Apr 17 14:45:05 2017 -0700 |
tree | 6abcfddae8460ed744036217c72bd98d6b40a08c | |
parent | 3c32c296e89cf1db54c6e50010246866e1389b2d [diff] |
[maven-release-plugin] prepare release maven-wrapper-0.2.0
The Maven Wrapper is an easy way to ensure a user of your Maven build has everything necessary to run your Maven build. Why might this be necessary? Maven to date has been very stable for users, is available on most systems or is easy to procure: but with many of the recent changes in Maven it will be easier for users to have a fully encapsulated build setup provided by the project. With the Maven Wrapper this is very easy to do and it's a great idea borrowed from Gradle.
The easiest way to setup the Maven Wrapper for your project is to use the Takari Maven Plugin with its provided wrapper
goal. To add all the necessary Maven Wrapper files to your project execute the following command:
mvn -N io.takari:maven:wrapper
Normally you instruct users to run the mvn
command like the following:
$ mvn clean install
But now, with a Maven Wrapper setup, you can instruct users to run wrapper scripts:
$ ./mvnw clean install
or
$ ./mvnw.cmd clean install
A normal Maven build will be executed with the one important change that if the user doesn't have the necessary version of Maven specified in .mvn/wrapper/maven-wrapper.properties
it will be downloaded for the user first.
The wrapper should work on various operating systems including
For all those various shell systems should work including
In term of Maven versions it should work with any Maven 3.x version and it defaults to the latest release - currently 3.5.0.
Please check out the changelog for more information about our releases.
To switch the version of Maven used to build a project you can initialize it using
mvn -N io.takari:maven:wrapper -Dmaven=3.3.3
which works for any version except snapshots. Once you have a wrapper you can change its version by setting the distributionUrl
in .mvn/wrapper/maven-wrapper.properties
, e.g.
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.1/apache-maven-3.2.1-bin.zip