I like this suggestion. using -P !profile to disable a profile is consistent with negation in properties activation, but the "-" symbol is also fine, if the feature works ;-)
using -P +profile is a comprehensible way to *add* a profile to the default active profile list. But some may prefer to use another symbol ? considering those two options, using -P profile to set from the command line the *exact *list of profiles to be enabled (disable default active profiles) is consistent. Maven 2.1 syntax for profiles is not very nice to read... I'd prefer either the same +/- syntax, or some --enable-profile x (-P x), --disable-profile y (-dP y) 2008/5/15 Bernhard David <[EMAIL PROTECTED]>: > Hello, > > here's a suggestion Re. point 2 > > > 2. Should default profiles be automatically deactivated if another > profile is > > activated? I don't think the current behaviour should be changed in > 2.0.x, but > > for 2.1 I think it's worth considering leaving default profiles active > unless > > explicitly disabled. > > would it be possible to have "-Pprofile" work as usual (activate > profile, deactivate defaults) but "-P+profile" add profile to the > existing ones, without deactivating defaults? Or if "+" is taken we > could use some other character. > > In any case it would be really useful to add profiles like this, for > instance to support "mvn install -P+optionalTests" without having to > figure out what other profiles you need manually. > > Greetings, > > David Bernhard > > > > -----Original Message----- > > From: Jesse McConnell [mailto:[EMAIL PROTECTED] > > Sent: 15 May 2008 00:04 > > To: Maven Developers List > > Subject: Re: Profile activation/deactivation > > > > I think the ! is probably better then D: E: E: > > > > jesse > > > > On Wed, May 14, 2008 at 4:51 PM, Paul Gier <[EMAIL PROTECTED]> wrote: > > > Brian E. Fox wrote: > > > > > > > <snip> > > > > Need to think about 1& 2 some more but: > > > > > > > > > > > > > 3. There was a suggestion to allow the use of "!" to > > disable a profile. > > > > > > > > > So the > > > > > > > > > command line would look like: mvn -P!myProfile > > > > > > > > > > > > > > > > > > This seems more intuitive than the current syntax using > > a dash, and I > > > > > > > > > created > > > > > > > > > MNG-3571 for it. But I'm hesitant to add it since we > > can already use > > > > > > > > > "-" for > > > > > > > > > this, and it looks like "mvn -P D:myProfile" was added > > as another > > > > > > > > > option for > > > > > > > > > disabling a profile in 2.1. > > > > > > > > > > > > > As far as I know, the - never worked so going to ! is > > better...I think > > > > the 2.1 deactivation should be brought in line as > > well...we don't need > > > > more proliferation of changes. > > > > > > > > > > > > > > Should I remove both "-" and "+" since they would both be > > redundant if we > > > add "!"? > > > > > > So some examples would be: > > > mvn -P !profile1,profile2,profile3 > > > > > > And in maven 2.1 currently this can also be expressed with: > > > mvn -P D:profile1,E:profile2,E:profile3 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > -- > > jesse mcconnell > > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > > 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] > >