Maybe I should clarify this a little more, seeing I didn't get any response so 
far...

My build is basically looking like this:

<!-- Only define those modules that would be used by an external component -->
<modules>
        <module>../hermes-person-shared</module>
        <module>../hermes-person-external-client</module>
</modules>
<profiles>
        <profile>
                <!-- Deployment build - include everything necessary for 
deployment, except the external modules (see above), they are there per default 
-->
                <id>person</id>
                <modules>
                        <module>../hermes-person-internal-client</module>
                        <module>../hermes-person-model</module>
                        <module>../hermes-person-external-model-client</module>
                        <module>../hermes-person-internal-model-client</module>
                        <module>../hermes-person-server</module>
                        <module>../hermes-person-war-java</module>
                        <module>../hermes-person-war</module>
                        <module>../hermes-person-ear</module>
                </modules>
        </profile>
        <profile>
                <!-- Default build - include MOCK-module -->
                <id>person-development</id>
                <activation>
                        <property>
                                <name>person</name>
                        </property>
                </activation>
                <modules>
                        
<module>../hermes-person-geography-link-external-client-mock</module>
                </modules>
        </profile>
        <profile>
                <!-- Test build - include Test-module and activate Clover -->
                <id>person-test</id>
                <activation>
                        <property>
                                <name>person</name>
                                <value>test</value>
                        </property>
                </activation>
                <modules>
                        <module>../hermes-person-test</module>
                </modules>
                <properties>
                        <!-- Overwrite properties for testing -->
                        <build.type>test</build.type>
                        <classifier.name>clover</classifier.name>
                </properties>
        </profile>
</profiles>

I know it is possible to activate multiple profiles over the -P switch, or even 
the -D, but what I would like to do is just activate 1 profile,
which activates all profiles it needs in order to build. In my case:

mvn install -- build only the externally used components
mvn install -Pperson -- build deployment (=customer) version
mvn install -Pperson-development -- as -Pperson, but also add the 
MOCK-module(s) for external components
mvn install -Pperson-test -- as -Pperson-development, but also add the 
test-module to run the integration-tests

Atm, the only way I have found to activate multiple profiles with (sort of) the 
same switch, can be seen in the person-development and
person-test profiles. I use the property 'person', which activates 
person-development whenever used and activates person-test when set
to 'test'.

The thing is, that I want my build to be a little more fail-safe... In case I 
forget to activate a profile, it would be nice if maven could do it
for me, which makes it sort of a profile-dependency...

I realize something alike can be done by copying all modules to the different 
builds, but I want to keep my POM's as short as possible,
as the parent-POM (to which this snippet belongs) will be big enough without 
having a lot of double definitions.

Maybe I should file this as a feature-request?

Roland



On Tuesday 16 May 2006 17:42, Roland Asmann wrote:
> Hi,
>
> Can anybody tell me if it is possible to have profiles activate each other
> and how to do this? The thing is that I have a certain 'default' profile
> and several extra profiles that need one or two extra modules and/or
> dependencies and/or plugins.
> Now I know that I can use the command-line to activate multiple profiles,
> but it would be nice to tell a profile that it has sort of a
> 'dependency-profile' which it MUST activate.
>
> Any thoughts on this?
>
> Roland
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to