Szanownego
Szanownego

Reputation: 259

Maven - How build only some modules of application?

I am pretty new in using Maven. I need to understand how to build only some modules of my application (supposing my application has many sub-modules). Searching through internet I found ambiguous answers, so I am a little bit confused about that.

Upvotes: 0

Views: 669

Answers (1)

letmesolve
letmesolve

Reputation: 304

if you looking for solution wherein you need to build the specific sub modules multiple times, then you can have another pom file which will have modules listed that you want to build.

Create a new pom file, and add

<modules>
        <module>{relative-path to the pom file of the module1}</module>
        <module>{relative-path to the pom file of the module2}</module>
</modules>

You need not specify the pom.xml in the path.

Option 2: If you requirement is not frequent build, then you can just get into the location of you pom file of the specific module in command prompt and run "mvn clean install".

Upvotes: 1

Related Questions