David,

this gave me hard time too. After a while I realized, that profiles
can only be activated by *system* properties which is a different
beast than those properties one can define in a POM or the settings.
System properties are those which are provided to maven by the command
line parameter "-D".

http://maven.apache.org/guides/introduction/introduction-to-profiles.html
explicitely uses the term "system property" when it comes to profile
activation by property values.

-Stefan

2008/9/19 David <[EMAIL PROTECTED]>:
> Hello All,
>
> I'm trying to set a property in the settings.xml file and then have a
> profile in the pom.xml file activate if that property is set.  Right now I
> don't care about the value, I just need it to be set.  Currently I have the
> following in my settings.xml file.
>
> <profile>
>  <id>A</id>
>    <activation>
>      <activeByDefault>true</activeByDefault>
>    </activation>
>    <properties>
>      <david>C:\temp</david>
>    </properties>
> </profile>
>
> In my pom.xml I have the following.
>
> <profiles>
>        <profile>
>            <id>B</id>
>            <activation>
>                <property>
>                    <name>david</name>
>                </property>
>            </activation>
> ...
> <profiles>
>
> I can see from running mvn help:active-profiles that profile A in the
> settings.xml file is active but profile B is not.  I can also use the David
> property in other areas of the pom file.  I'm I doing something wrong?  I'm
> using Maven-2.0.6 on Windows.
>
> Thanks,
>
> David
>

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

Reply via email to