Le Wed, 11 Nov 2009 18:07:31 -0500,
Yaakov Chaikin <[email protected]> a écrit :

> Hmm... Just tried specifying <createDb>false</createDb> in my
> settings.xml and it STILL does NOT activate any profiles! Anyone has
> any idea of what's going on here?
> 
> Thanks in advance for your help.
> 
It seems weird to me to use 2 profile to do the same thing ?

why do you want to use 2 profiles ? Moreover why using a profile ?

Could you not just use your property createDb ? and override it in your child 
pom ?

Can you post the complete example of your poms and give the maven version you 
are using, it could help I think.

Sorry to not have a magic solution for you (perharps a maven expert could you 
help you more...)

Cheers,

Tony.

> Yaakov.
> 
> On Wed, Nov 11, 2009 at 5:44 PM, Yaakov Chaikin
> <[email protected]> wrote:
> > Hi,
> >
> > I am clearly not understanding how properties propagate in maven...
> >
> > I have a multi-module project where I have a root pom.xml
> > (<packaging>pom</packaging>) and a number of child modules.
> >
> > In my root pom.xml I have this:
> > <properties>
> >  <createDb>false</createDb>
> > </properties>
> >
> >
> > In one of the my child module's pom.xml I have the following:
> >
> > ...
> > <profiles>
> >  <profile>
> >    <id>SkipDbCreationIsTrue</id>
> >    <activation>
> >        <property>
> >           <name>createDb</name>
> >           <value>false</name>
> >        </property>
> >     </activation>
> >     <properties>
> >         <skipDbCreation>true</skipDbCreation>
> >     </properties>
> >   </profile>
> >
> >    <profile>
> >    <id>SkipDbCreationIsFalse</id>
> >    <activation>
> >        <property>
> >           <name>createDb</name>
> >           <value>true</name>
> >        </property>
> >     </activation>
> >     <properties>
> >         <skipDbCreation>false</skipDbCreation>
> >     </properties>
> >   </profile>
> > <profiles>
> > ...
> >
> > When I do mvn help:active-profiles neither of these profiles are
> > active! However, when I specify the property directly on the command
> > line, depending on its value, the correct profile gets activated. It's
> > as if 'createDb' property, which I am using to do activation, is not
> > there at the time maven decides which profiles to use.
> >
> > I could place the 'createDb' property into settings.xml, but I don't
> > want to do that for reasons outside the scope of this question.
> >
> > Can anyone spot what I am doing wrong here? I already checked the
> > spelling of the property in both places and it's correct...
> >
> > Any ideas anyone?
> >
> > Thanks,
> > Yaakov.
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 



-- 

Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: [email protected]  
http://www.codelutin.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to