How do I specify which sub-module to build from parent maven project?

27 Views Asked by At

I have three levels of Maven Multi Module project.

Grand Father -> includes Father

Father -> Includes Mulitple Sons

Son1 Son2 Son3

My Jenkins job triggers build from Grand Father project. i.e. top most.

I want to Grand Father to build only Project Son1 and Son2 and not Son3.

But problem is Son1, Son2 and Son3 are not visible to Grand Father Project

So how can I control which sub-sub project to build from parent?

Something like this,

C:\Documents\project\GrandFather> mvn --projects father.son1,father.son2 --also-make clean install

I was reading this Maven Modules + Building a Single Specific Module

But this solution is for only immediate child maven project.

0

There are 0 best solutions below