Skip to content
Kristian Karl edited this page Mar 4, 2021 · 5 revisions

With version 4.3.1, the maven wrapper was introduced, eliminating the need to manually install Maven.

The Maven Wrapper is an easy way to ensure a user of your Maven build has everything necessary to run your Maven build.

The official documentation is here.

Normally, a specific version of Apache Maven needs to be installed on our machine, put on the PATH and then run using the mvn command like the following:

mvn clean install

But now, with a Maven Wrapper setup, you can run maven wrapper scripts instead:

./mvnw clean install

or on Windows

mvnw.cmd clean install

A normal Maven build will be executed with the one important change that if the you doesn't have the necessary version of Maven specified in .mvn/wrapper/maven-wrapper.properties it will be downloaded for the you first, installed and then used.

Subsequent uses of mvn/mvnw.cmd use the previously downloaded, specific version as needed.

Clone this wiki locally