Embracing the Messiness in Search of Epic Solutions

Maven: Building Specific Module in Multi-Module Project

Posted

in

Let’s assume we have a multi-module project that looks something like this:-

app
├── pom.xml
├── app-jar
│   └── pom.xml
├── app-ear
│   └── pom.xml
└── app-war
    └── pom.xml

To build certain module(s) within the project, we can use the -pl option. For example, the following mvn command will only build app-jar module:-

clean -pl app-jar verify site

Tags:

Comments

Leave a Reply