Maven Wrapper

The Maven wrapper is a great tool to use a specific version of Maven. Usually, every developer has a specific Maven version installed. But some of us are updating Maven more often than other ones. If you want to share your project with somebody who has a different version installed, it could run into some issues. Then you have to figure out, why it isn’t working and you lose time and nerves.

To make your life easier add the Maven Wrapper to your project. By default you can use the following command in your root project folder:

mvn -N io.takari:maven:wrapper 
// Try also to point to a specifc verision
mvn -N io.takari:maven:wrapper -Dmaven=3.5.4

The wrapper adds some files to your project, which are necessary to run the Maven wrapper. Instead of the common Maven command mvn clean install you need to use the script command:

./mvnw clean install          // Unix based OS
mvnw.cmd clean install        // Windows based OS

It works for different operating systems:

  • Windows
  • Linux
  • Mac
  • Solaris

Maven Wrapper is a great tool to support you. If you are interested in more detail please visit the github project site:


Leave a comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.