maven/maven-wrapper
Manfred Moser b18f554a74 added changelog entry about spaces fix 2020-06-21 11:17:59 +02:00
..
.mvn/wrapper updated wrapper maven version to 3.3.9 2020-06-21 11:17:55 +02:00
src fix to avoid usage of stale maven wrapper jar 2020-06-21 11:17:56 +02:00
.gitignore Formatting 2020-06-21 11:16:57 +02:00
CHANGELOG.md added changelog entry about spaces fix 2020-06-21 11:17:59 +02:00
LICENSE.txt Add license file 2020-06-21 11:17:20 +02:00
README.md adding changelog 2020-06-21 11:17:48 +02:00
mvnw support spaces in folder names on nix, simplified from https://github.com/takari/maven-wrapper/pull/25 2020-06-21 11:17:58 +02:00
mvnw.cmd remove unused MAVEN_CMD_LINE_ARGS 2020-06-21 11:17:47 +02:00
pom.xml updated parent to latest release 2020-06-21 11:17:54 +02:00

README.md

Maven Wrapper

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.

Changes

Please check out the changelog for more information about our releases.

Using a Different Version of Maven

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