Hi Simon in your settings.xml define your <profile>then activate the predefined profile by placing the profile in <activeProfile>
e.g.<settings>
        <profiles>
                <profile>
              <id>freeform-lutece</id>
              <properties>
                
<freeform.additionalGoals>lutece:exploded,lutece:inplace,lutece:assembly,lutece:site-assembly
                        </freeform.additionalGoals>
                <freeform.additionalFolders>webapp</freeform.additionalFolders>
              </properties>
            </profile>
                ...
        </profiles>
        <activeProfiles>
            <activeProfile>freeform-lutece</activeProfile>
        </activeProfiles>
</settings>http://dev.lutece.paris.fr/wikilutece/index.php?title=The_plugin_maven2_%22netbeans-freeform%22Bon Chance,Martin----- Original Message ----- From: "simon" <[EMAIL PROTECTED]>
To: "Maven Users List" <[email protected]>
Sent: Saturday, May 31, 2008 12:32 PM
Subject: Re: selecting profile in the pom.xml file



On Sat, 2008-05-31 at 18:20 +0200, Stefano Nichele wrote:
Hi Mick,
thanks for your comment, but maybe my question was not clear enough. It
seems that in the settings.xml, you comment the profile that you don't
want to use according to the project that you are building. My
requirement is a bit different.
In my settings.xml I have profileA and profileB. ProfileA is the active one.

Now I would like that  project1 uses profileA and project2 uses profileB
but I don't want to change my settings.xml  anytime. I need something to
say in the pom file of the project2 that the profile to use is profileB.

For profiles declared within a pom, I believe that the <property> values
defined in the pom can be used in the activation section of the profile.

But I don't know of any way for a pom to select a profile from an
external settings file. The properties defined in a pom cannot be
referenced from an external profile definition.

Note that in general, stuff in settings.xml (including profiles) should
be used as little as possible, as it makes builds unrepeatable (it
controls the build, but is not under version control). If you can move
your profile from settings.xml into the pom that would be the best
solution..

Regards,
Simon


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




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

Reply via email to