mavenjenkinsjenkins-pipelinemaven-reactor

Build Multi Module project with Maven in Jenkins


we're using jenkins and i'm wondering if it's possible to build all my modules using maven in 1 Job, our project structure is like this:

Web
├── Server
│   ├── moduleA
│   │   └── pom.xml <--- Module A POM
│   ├── moduleB
│   │   └── pom.xml <--- Module B POM
│   └── moduleC
│        └── pom.xml <--- Module C POM      
│
|──  Client 
        ├── Pom.xml       

The way we're working now is that we have a jenkins job for every module in Server and 1 jenkins job for client Side , is it possible to create only one job and build All the Client and Server modules ?


Solution

  • you can create a parent pom that will contain all modules , than Jenkins will build this parent pom.

    another option is to trigger several MVN commands ( but the first option is much better)