maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: Cascading profile activation
Date Sat, 02 Oct 2010 18:11:20 GMT
On Sat, Oct 2, 2010 at 1:33 PM, Géraud <galak75@gmail.com> wrote:
> Thanks for your answer. So, for the same reason, when "server.type" is
> defined as a global property in my pom file, the "type1" profile is not
> active.
>
> But is there a way to automaticallly activate "type1" profile when "env1"
> profile is active ?

I believe that the answer to this is 'no'.


> Géraud
>
>
> 2010/10/1 Anders Hammar <anders@hammar.net>
>
>> Yes, profiles can only be activated by a system property. server.type is a
>> maven property, hence it will not activate another profile.
>>
>> /Anders
>>
>> On Fri, Oct 1, 2010 at 02:56, Géraud <galak75@gmail.com> wrote:
>>
>> > Hi
>> >
>> > I'm trying to activate a profile inside another profile :
>> > here is an example :
>> >
>> >  <profiles>
>> >   <!-- ENVIRONMENTS -->
>> >   <profile>
>> >     <id>env1</id>
>> >     <activation>
>> >       <property>
>> >         <name>env</name>
>> >         <value>1</value>
>> >       </property>
>> >     </activation>
>> >     <properties>
>> >       <server.type>type1</server.type>
>> >     </properties>
>> >   </profile>
>> >
>> >   <!-- define other environments -->
>> >
>> >   <!-- SERVER TYPES -->
>> >   <profile>
>> >     <id>type1</id>
>> >     <activation>
>> >       <property>
>> >         <name>server.type</name>
>> >         <value>type1</value>
>> >       </property>
>> >     </activation>
>> >     <properties>
>> >       <!-- define properties... -->
>> >     </properties>
>> >  </profile>
>> >
>> >  <!-- define other server types -->
>> >
>> >  </profiles>
>> >
>> > when I try to run a maven command, activating "env1" profile, "type1"
>> > profile is never activated
>> > e.g.: mvn help:active-profiles -Denv=1
>> >
>> > I tried with differents configurations :
>> > OS: windows XP and Vista
>> > Maven: 2.0.9 and 2.2.1
>> >
>> > Did I miss something ?
>> >
>> > Géraud
>> >
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message