You activate the release-profile yourself by setting the property to the
expected value!
Remove the <properties>-tag from the profile and everything should work just
fine!
On Wednesday 14 November 2007 23:46, dev dev wrote:
> I have defined 2 project profiles (below) and the goal is to be able
> to run in exclusively in devel or release environment (and not both).
> However, when i run mvn help:active-profiles, i got the below message.
> It should be just "release" and NOT both (devel and release). What did
> you do wrong, is this a bug in Maven2?
>
> Active Profiles for Project
> 'com.mycompany.myproject:myproject-web:pom:1.0.0-SNAPSHOT':
>
> The following profiles are active:
>
> - devel (source: pom)
> - release (source: pom)
>
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>
> <project>
> ...
> <profile>
> <id>release</id>
> <properties>
> <environment.type>release</environment.type>
> </properties>
> <activation>
> <property>
> <name>environment.type</name>
> <value>release</value>
> </property>
> </activation>
> </profile>
>
> <profile>
> <id>devel</id>
> <activation>
> <property>
> <name>!environment.type</name> <!--This profile
> is activated when no ${environment.type} property is set. -->
> </property>
> </activation>
> </profile>
>
> ....
> </project>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Roland Asmann
CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien
Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]