Skip to content
Maven Plugin to Install the Maven Wrapper
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main/java/io/takari/maven/plugins space instad of tab Feb 26, 2019
.gitignore Start of some useful utilities to help users with their Maven builds. Apr 3, 2015
CHANGELOG.md
LICENSE.txt added EPL license file as explicit file to make parsing and info easi… Apr 5, 2017
README.md Added version to documented usage Mar 17, 2019
pom.xml

README.md

Takari Maven Plugin

Install the Maven Wrapper in your Maven Project

cd yourmavenproject
mvn -N io.takari:maven:0.7.4:wrapper

You can set a specific Maven release (but not SNAPSHOT) by adding a maven parameter :

cd yourmavenproject
mvn -N io.takari:maven:0.7.4:wrapper -Dmaven=3.5.4

Alternatively, you can set a specific download url (which could point to a SNAPSHOT version of Maven) by using the distributionUrl parameter :

cd yourmavenproject
mvn -N io.takari:maven:0.7.4:wrapper -DdistributionUrl=http://server/path/to/maven/distro.zip

or you can set the URL to a Maven repository manager with the MVNW_REPOURL environment variable.

This will create a mvnw and a mvnw.cmd file as well as a .mvn folder in your project. You can now use mvnw instead of mvn in all project builds, which will download the configured Maven installation as required.

The .mvn folder contains the optional wrapper jar and the maven-wrapper.properties configuration file with the URLs to download the wrapper jar and the maven zip archive from.

Updating the Maven Wrapper in your Maven Project

In order to upgrade the Maven Wrapper in your project, you simply run the installation commands as documented above again. This will overwrite the installed files and you can then proceed to compare old and new files and commit as desired.

Typically, use the scripts and binaries as updated and only adjust config files, if needed.

More Information

More details about the Maven Wrapper including

  • URL config changes,
  • verbose mode with MVNW_VERBOSE,
  • no binary usage mode and
  • parameters MVNW_USERNAME, MVNW_PASSWORD and MVNW_REPOURL

can be found with the maven-wrapper project.

You can’t perform that action at this time.