Skip to content
Go to file
This branch is 70 commits ahead, 4 commits behind bdemers:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Maven Command Line Wrapper


This is a copy of the Gradle wrapper ported for use with Apache Maven. maven-wrapper is available from Maven Central.

The Maven Command Line Wrapper will auto-download and install Apache Maven from the Internet and then run your Maven goals. maven-wrapper ships as Maven plugin that generates wrapper scripts and a configuration file to bootstrap Maven download and installation.


This is a fork of bdemers’ maven-wrapper in order to provide the Maven Wrapper as a Maven plugin, for more flexible reuse/integration. Once you have a Maven project that you want to distribute, you can generate a wrapper so that:

  • The target audience can easily execute Maven goals without an existing Maven application as a pre-requisite.
  • You can control the version of Maven that is to be used to build the project, if are versions compatibility concerns.

Integration example

For a full and small practical integration example, checkout the Maven Command Line Wrapper Example project.

If you used to run

mvn clean install

Then you would now run (without a leading ./ for MS Windows)

./mvnw clean install

A wrapper created with Maven 3.0.4 will request Maven 3.0.4, if it’s not already installed on the user’s machine. However, you can still request a specific Maven version by overriding the default behaviour (Maven plugin configuration).

Notes: You need a valid JDK at least 1.6. The plugin was tested with Maven 3.0.2 and above.

Maven Goals and Usage

For the list of goals and a usage guide, please consult the Wiki.

Generating the Maven wrapper

After integrating the wrapper into your Maven project (plugin section), run the following command to generate the wrapper.

mvn wrapper:wrapper

The mvnw and mwnw.bat command wrappers are generated at the root of the project folder.

The maven folder is generated with the relevant jar and properties file in the project directory.

You can now start using either the mvnw or mvnw.bat commands on any project without an existing maven installation!



Pull requests, issues creation, suggestions, documentation improvements are welcome.

Big thank you to all of you who contributed to this project so far.


Maven Command Line Wrapper as Maven plugin



You can’t perform that action at this time.