Hi, If I understand Maven's profile system correctly, you *could* still invoke both at the same time if you did:
mvn -PA,B [..] The activation block will just specify how the profiles activate by default. Depending on how explicit your profile exclusion requirements are, this solution may not be quite enough - you may want to try something like: * Create a flag file in the /target folder when a profile runs (e.g. /target/A.flag) * Check for the existence of that flag in the other profile (e.g. if profile B sees a.flag, it bombs) * Remember to delete the flag file at the end of the build process. :) Thanks, Ryan Slobojan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, November 30, 2006 6:39 AM To: users@maven.apache.org Subject: RE: [m2] exclusive profiles Thanks. It's exactly what I want I didn't know the prop / !prop trick. Very useful. > -----Message d'origine----- > De : Andrew Williams [mailto:[EMAIL PROTECTED] Envoyé : jeudi 30 > novembre 2006 14:29 À : Maven Users List Objet : Re: [m2] exclusive > profiles > > I would do it using a property (say "alt") and the following > activation > configuration: > > <profiles> > <profile> > <id>A</id> > <activation> > <property> > <name>!alt</name> > </property> > </activation> > > ... > > </profile> > <profile> > <id>B</id> > <activation> > <property> > <name>alt</name> > </property> > </activation> > > ... > > </profile> > </profiles> > > Then using "mvn sometarget" will use profile A, but "mvn -Dalt > sometarget" will use profile B. > Hope that helps, > > Andy > > > [EMAIL PROTECTED] wrote: > > Hi maven-users, > > > > How would you exclude or include (some kind of XOR) some > profiles in a > > settings.xml > > Example: I've defined 2 profiles A and B. I would like to > configure the following comportement: > > A ? B ? > > 0 0 error > > 0 1 OK > > 1 0 OK > > 1 1 error > > > > How would you do? > > > > Thanks for your answer. > > > > Rémy > > [snip] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]