Cargo and multi-module project
Hi List,
I'm creating an automatic build system using Hudson, Maven and Cargo.
This system will be used for many projects that use Maven, so in order to not have to duplicate the cargo configuration over and over, I placed it in a parent pom.
Now, I have this multi-module project that consists of:
- Module1: JAR library
- Module2: JAR library
- Module3: WAR webapp including Module1 and Module2
The structure of my project looks like this:
PARENT POM (Containing Cargo configuration)
Project PARENT POM (Common settings for all modules all stored here)
Module1 POM (jar)
Module2 POM (jar)
Module3 POM (war)
When I execute Maven, I see that the Cargo plugin is executed for all modules, even for the Project Parent POM.
I only want Cargo to be executed for Module3. I've been looking for a solution for the last three days, unfortunately without any success.
I tried putting the Cargo settings inside a profile, and activate this profile in case the project type is WAR, but Maven doesn't support this.
A solution would be to put the Cargo configuration inside the War POM. But take into account that this will be used by many many Maven projects, and it's really a pitty that I have to include the exactly the same configuration in each project.
I would really appreciate it if someone could shed a light on this.
Thanks in advance.