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 ?
Géraud


2010/10/1 Anders Hammar <and...@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 <gala...@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
> >
>

Reply via email to