Same use case here.

IMHO having a distinction between "-P profile" and "-P +profile" is
acceptable. "-P profile" may work as it does today (specify the exact list
of profiles, whith auto-disabled default ones). For backward compatibility,
but also to enable exclusive profiles switching.


2008/5/15 Mark Hobson <[EMAIL PROTECTED]>:

> Would a concept of profile groups help to determine which profiles are
> meant to be mutually exclusive?
>
> I use mutually exclusive profiles for different deployment
> configurations, for example development and production.  By default,
> the development profile is actived by default, so currently
> -Pproduction would disable the development profile and enable the
> production profile.  The proposed changes would require
> -P!development,production, which is a little cumbersome and prone to
> error.
>
> +1 for using the !-notation for disabling profiles.
>
> Mark
>
> 2008/5/14 Paul Gier <[EMAIL PROTECTED]>:
> >
> > I would like to bring up a couple of issues related to profile activation
> > and deactivation.  While working on MNG-3545 I noticed some cases where
> the
> > current behaviour might be improved.
> >
> >
> > 1. What is the correct behaviour when there is more than one
> activeByDefault
> > profile and I manually activate one of them?  Currently, if I have two
> > activeByDefault profiles, profile1 and profile2, and I run "mvn
> -P+profile1"
> > then profile1 stays active and profile2 is deactivated.  This also bring
> up
> > the following more general question.
> >
> >
> > 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.
> >
> > If you think of profiles as being mutually exclusive, then it makes sense
> to
> > activate one and have the default profile be deactivated.  But IMO that
> > seems to be a less common use case vs. using profiles to activate
> particular
> > parts of a build and not normally interfering with each other.  In this
> case
> > it seems more intuitive that an activeByDefault profile is always active
> > unless deactivated. In addition, now that profiles can be deactivated as
> > needed from the command line, there doesn't seem to be as much of a need
> to
> > have activeByDefault profiles automatically turn off.
> >
> >
> > 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.
> >
> >
> > ---------------------------------------------------------------------
> > 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