You are right that profiles are only additive. I'd configure a profile named
"development" or something like that, activate it by default, include and
create the test ears in it, then configure another profile named "release",
"versioned" or "distro" that doesn't specify the test ears but includes the
final one. You need to have the profile configurations in several poms with
matching profile names. More about activebydefault profile at
http://maven.apache.org/guides/introduction/introduction-to-profiles.html

Kalle

On Wed, Jun 25, 2008 at 9:25 AM, Chris Lieb <[EMAIL PROTECTED]> wrote:

> Hope y'all don't mind if I give this a bump.
>
>
> Chris Lieb wrote:
>
>> 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