I have a multi-module web project with the following structure:

swear (pom)
|- fish-tissue (pom)
|  |- ft-webapp (war)
|  |- ft-ear (ear)
|- swear-core (pom)
|  |- sc-model (jar)
|  |- sc-webapp (war)
|  |- sc-ear (ear)
|- swear-ear (ear)

sc-ear is an EAR for testing just the swear-core module and ft-ear is an EAR for testing the fish-tissue module. swear-ear is the EAR that will house the final deployment unit for the entire application.

Currently, both the swear-core and fish-tissue modules have a pom.xml that builds all sub-projects, including the test EARs, along with a pom-no-ear.xml that builds all sub-projects except for the EAR, and is used when constructing the final swear-ear deployment unit. I achieve this by placing the following modules section into the POM for swear:
<modules>
  <module>swear-core/pom-no-ear.xml</module>
  <module>fish-tissue/pom-no-ear.xml</module>
</modules>

This does not seem right to me since the pom.xml and the pom-no-ear.xml are otherwise identical, with the exception of the one module (the EAR module) that is conditionally included. This would mean that, depending on when you pulled a POM artifact from the repository, you would get different POMs.

I think that this could be remedied by using activation elements to control the included modules, but activation only seems to be additive, not subtractive. This is an issue since, by default, we want the testing EARs to be generated, with the no-EAR mode to be only used for generating a final deployment unit.

Does anyone know how to achieve this?

Thanks,
Chris Lieb

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to