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]
