Maven

How to use Maven Wrapper with Multi Module ?

When using a spring boot project that has multiple modules it is best to use a Maven wrapper because a lot of times there seems to be dependency between these modules. Most of it has to do with version.

Example let’s say: For Module A the version . was 1.0.0 and for Module B version was also 1.0.0 . And there was a need to update the code on Module B and also the version on B as well. If these module are dependent on each other then the whole project might not run as expected. Using this Maven wrapper (See Gradle wrapper as well if using Gradle) takes care of this repeated work. You change it in on place and relax.

There seems to be several ways to use this plugin but the one I found it easy was the auto approach.

First, we need to go in the main folder of the project and run this command:

1mvn -N io.takari:maven:wrapper

Based on your needs :

-N means –non-recursive  Wrapper will only be applied to the main project of the but not in any sub-modules.

Leave a Reply

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