I did this on a previous project like this :-

EAR pom.xml

<webModule>
        <groupId>mygroup</groupId>
        <artifactId>myartifact</artifactId>
        <contextRoot>/myroot</contextRoot>
        <bundleFileName>name</bundleFileName>
        <excluded>${myartifact.optional.war.excluded}</excluded>
</webModule>

then either in the parent pom.xml or in settings.xml you can define a
property with a different setting per profile e.g.

<profile>
        <id>env_dev</id>
        <activation>
                <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
                <profile.name>env_dev</profile.name>
                
<myartifact.optional.war.excluded>false</myartifact.optional.war.excluded>      
    
        </properties>
</profile>
<profile>
        <id>env_live</id>
        <properties>
                <profile.name>env_live</profile.name>
                
<myartifact.optional.war.excluded>true</myartifact.optional.war.excluded>
        </properties>
</profile>

this also works for EAR <javaModule> and <ejbModule>

Pete
On 18/09/06, Eric Redmond <[EMAIL PROTECTED]> wrote:
http://maven.apache.org/plugins/maven-ear-plugin/howto.html

The ear plugin configuration to generate the application.xml can be
different per profile.

Eric

On 9/18/06, Marco Mistroni <[EMAIL PROTECTED]> wrote:
>
> hi all,
>   i have a usecase in which i have to deploy an ear..
> if the .ear is set to production, i have to include modules 1, 2 and 3
> if the .ear is set to test/qa, i have to include modules 1,2,3,4
>
> i was wondering if having profiles could help....but i fail to see how to
> achieve
> to include only certain modules in an .ear, unless i provide myself the
> application.xml for thte two
> different configurations
>
> has anyone any idea / tips on how to do it properly?
>
> thanks in advance and regards
> marco
>
>


--
Eric Redmond
http://codehaus.org/~eredmond



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

Reply via email to