You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Paul Gier <pg...@redhat.com> on 2008/05/14 23:17:35 UTC

Profile activation/deactivation

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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by nicolas de loof <ni...@apache.org>.
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 <ma...@gmail.com>:

> 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 <pg...@redhat.com>:
> >
> > 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: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Profile activation/deactivation

Posted by Mark Hobson <ma...@gmail.com>.
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 <pg...@redhat.com>:
>
> 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: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Paul Gier <pg...@redhat.com>.
Ralph Goers wrote:
> Paul Gier wrote:
>>
>> 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.
> Seems right to me.
>>
>>
>> 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.
>>
> I just implemented a project where this behavior was required. In the 
> default case I build and test with SLF4J and logback. In test 2 I test 
> with SLF4J and Log4j. If the default was never turned off then I'd have 
> no way of doing this unless there was no default.

The idea was that you could still turn off an activeByDefault profile, just that 
you would have to do it using the deactivation syntax, instead of it turning off 
automatically when another profile is activated.

Anyway, it sounds like profile usage is somewhat split between using them in a 
mutually exclusive way vs. using multiple profiles together, so having a way to 
do either of these like "-P +myprofile" vs "-P myprofile" seems like it would be 
useful.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Ralph Goers <Ra...@dslextreme.com>.
Paul Gier wrote:
>
> 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.
Seems right to me.
>
>
> 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.
>
I just implemented a project where this behavior was required. In the 
default case I build and test with SLF4J and logback. In test 2 I test 
with SLF4J and Log4j. If the default was never turned off then I'd have 
no way of doing this unless there was no default.
>
> 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: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Benjamin Bentmann <be...@udo.edu>.
Paul Gier wrote:

> 3. There was a suggestion to allow the use of "!" to disable a profile. 
> So the command line would look like: mvn -P!myProfile

Unless some severe drawback is reported, +1 on this because "!" is quite 
natural among programmers for negation and also matches the existing syntax 
for negation of profile activation conditions in the POM.



Benjamin 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: Profile activation/deactivation

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.

>Should I remove both "-" and "+" since they would both be redundant if
we add "!"?

I would.

>So some examples would be:
>mvn -P !profile1,profile2,profile3

Yep.

>And in maven 2.1 currently this can also be expressed with:
>mvn -P D:profile1,E:profile2,E:profile3

I would make it the same as 2.0 above.






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by nicolas de loof <ni...@apache.org>.
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 <da...@elca.ch>:

> 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:jesse.mcconnell@gmail.com]
> > 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 <pg...@redhat.com> 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: dev-unsubscribe@maven.apache.org
> > >  For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
> >
> >
> > --
> > jesse mcconnell
> > jesse.mcconnell@gmail.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Profile activation/deactivation

Posted by Paul Gier <pg...@redhat.com>.
I agree, I think the best option for 2.0.x is to keep the current profile 
behaviour, with the working profile deactivation.
I like the idea of being able to use "+myProfile" to add a profile without 
deactivating the deafault profiles.  But for 2.0.x I think we should just leave 
the current behaviour because:

1. The change would require some changes to the ProfileManager interface and 
more changes to the DefaultProfileManager should probably wait until 2.1.

2. I see the "+" option as low priority because there is an easy workaround of 
just specifying all the profiles that you want active.

For 2.1 maybe we can add an optional groupId to the profile config like you 
suggested.


As far as reducing the overall need for profiles maybe being able to more easily 
control the build lifecycle would help.  For example, if there was an easy way 
to tell the build to skip a certain phase or skip certain plugins or executions, 
that might cover some profile use cases.


Brian E. Fox wrote:
> I think we should maintain the current functionality of a default deactivating when another profile in the pom is activated until there is a syntax to perform the same. I have often in the past done things like: (pseudo pom code)
> 
> <profile>
>   <id>all</id>
>   <activeByDefault>true</activeByDefault>
>   <modules>
>    <module>a</module>
>    <module>b</module>
>    <module>c</module>
> ...
> 
> <profile>
>   <id>a</id>
>   <modules>
>    <module>a</module>
> 
> Etc and the activation would be mvn xxx -Pa  and the expectation is you only build a...retraining everyone to say -Pa,!all is a bit much. 
> 
> To accomplish this correctly, you would need to add a profile group id and if nothing is there, then the explicitly share the same group, thus preserving backwards compat while giving a bit more flexibility.
> 
> I do share Jesse's sentiment about maybe we are missing something else. If there's anything in the pom that reduces clarity, it is definitely profiles.
> 
> --Brian
> 
> 
> -----Original Message-----
> From: jesse.mcconnell@gmail.com [mailto:jesse.mcconnell@gmail.com] On Behalf Of Jesse McConnell
> Sent: Thursday, May 15, 2008 11:37 AM
> To: Maven Developers List; rgoers@apache.org
> Subject: Re: Profile activation/deactivation
> 
> No one can dispute the nice things that profiles let us accomplish in
> terms of toggling on functionalities...
> 
> But I wonder much this will impact build reproducibility....especially
> given the existence of profiles in the settings.xml file.  It is
> already a source of minor pain where people need to pass around
> fragments of profiles to get their builds (or releases) working.  I
> wonder how much making it easier to toggle on and off profiles will
> impact the future of these sorts of practices.
> 
> I already have to edit my settings.xml file and comment in and out a
> certain profile if I want to deploy something from one place or
> another.  I could override on the cli but thats a big pita as well.
> John and I talked ages ago about how profiles were basically a hack
> and black magic in what they allowed people to do with any given
> build.  Seeing all of these +/-/D:/E:/! goop floating around seems to
> be increasing the black magic.  I am torn though, profiles have helped
> me immeasurably in the past...even if they made me feel a touch dirty
> in the process.
> 
> Are we missing a chance to codify some other sort of functionality
> that keeps build reproducibility at the forefront?  And by build
> reproducibility I mean out of the box, not after cut and pasting magic
> chunks of stuff around behind the scenes.
> 
> anywho, figured I would throw that out.
> jesse
> 
> On Thu, May 15, 2008 at 10:16 AM, Ralph Goers
> <Ra...@dslextreme.com> wrote:
>> +1.  My first reaction though was the thought, what should -P-profile do? Is
>> it confusing not to have it if + is supported? Would it be the same as
>> -P!profile?
>>
>>
>>  Bernhard David wrote:
>>
>>>
>>> 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
>>>
>>>
>>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>  For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: Profile activation/deactivation

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
I think we should maintain the current functionality of a default deactivating when another profile in the pom is activated until there is a syntax to perform the same. I have often in the past done things like: (pseudo pom code)

<profile>
  <id>all</id>
  <activeByDefault>true</activeByDefault>
  <modules>
   <module>a</module>
   <module>b</module>
   <module>c</module>
...

<profile>
  <id>a</id>
  <modules>
   <module>a</module>

Etc and the activation would be mvn xxx -Pa  and the expectation is you only build a...retraining everyone to say -Pa,!all is a bit much. 

To accomplish this correctly, you would need to add a profile group id and if nothing is there, then the explicitly share the same group, thus preserving backwards compat while giving a bit more flexibility.

I do share Jesse's sentiment about maybe we are missing something else. If there's anything in the pom that reduces clarity, it is definitely profiles.

--Brian


-----Original Message-----
From: jesse.mcconnell@gmail.com [mailto:jesse.mcconnell@gmail.com] On Behalf Of Jesse McConnell
Sent: Thursday, May 15, 2008 11:37 AM
To: Maven Developers List; rgoers@apache.org
Subject: Re: Profile activation/deactivation

No one can dispute the nice things that profiles let us accomplish in
terms of toggling on functionalities...

But I wonder much this will impact build reproducibility....especially
given the existence of profiles in the settings.xml file.  It is
already a source of minor pain where people need to pass around
fragments of profiles to get their builds (or releases) working.  I
wonder how much making it easier to toggle on and off profiles will
impact the future of these sorts of practices.

I already have to edit my settings.xml file and comment in and out a
certain profile if I want to deploy something from one place or
another.  I could override on the cli but thats a big pita as well.
John and I talked ages ago about how profiles were basically a hack
and black magic in what they allowed people to do with any given
build.  Seeing all of these +/-/D:/E:/! goop floating around seems to
be increasing the black magic.  I am torn though, profiles have helped
me immeasurably in the past...even if they made me feel a touch dirty
in the process.

Are we missing a chance to codify some other sort of functionality
that keeps build reproducibility at the forefront?  And by build
reproducibility I mean out of the box, not after cut and pasting magic
chunks of stuff around behind the scenes.

anywho, figured I would throw that out.
jesse

On Thu, May 15, 2008 at 10:16 AM, Ralph Goers
<Ra...@dslextreme.com> wrote:
> +1.  My first reaction though was the thought, what should -P-profile do? Is
> it confusing not to have it if + is supported? Would it be the same as
> -P!profile?
>
>
>  Bernhard David wrote:
>
> >
> >
> > 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
> >
> >
> >
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>  For additional commands, e-mail: dev-help@maven.apache.org
>
>



-- 
jesse mcconnell
jesse.mcconnell@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Jesse McConnell <jm...@apache.org>.
No one can dispute the nice things that profiles let us accomplish in
terms of toggling on functionalities...

But I wonder much this will impact build reproducibility....especially
given the existence of profiles in the settings.xml file.  It is
already a source of minor pain where people need to pass around
fragments of profiles to get their builds (or releases) working.  I
wonder how much making it easier to toggle on and off profiles will
impact the future of these sorts of practices.

I already have to edit my settings.xml file and comment in and out a
certain profile if I want to deploy something from one place or
another.  I could override on the cli but thats a big pita as well.
John and I talked ages ago about how profiles were basically a hack
and black magic in what they allowed people to do with any given
build.  Seeing all of these +/-/D:/E:/! goop floating around seems to
be increasing the black magic.  I am torn though, profiles have helped
me immeasurably in the past...even if they made me feel a touch dirty
in the process.

Are we missing a chance to codify some other sort of functionality
that keeps build reproducibility at the forefront?  And by build
reproducibility I mean out of the box, not after cut and pasting magic
chunks of stuff around behind the scenes.

anywho, figured I would throw that out.
jesse

On Thu, May 15, 2008 at 10:16 AM, Ralph Goers
<Ra...@dslextreme.com> wrote:
> +1.  My first reaction though was the thought, what should -P-profile do? Is
> it confusing not to have it if + is supported? Would it be the same as
> -P!profile?
>
>
>  Bernhard David wrote:
>
> >
> >
> > 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
> >
> >
> >
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>  For additional commands, e-mail: dev-help@maven.apache.org
>
>



-- 
jesse mcconnell
jesse.mcconnell@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Ralph Goers <Ra...@dslextreme.com>.
+1.  My first reaction though was the thought, what should -P-profile 
do? Is it confusing not to have it if + is supported? Would it be the 
same as -P!profile?

Bernhard David wrote:
>
>
> 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
>
>   
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: Profile activation/deactivation

Posted by Bernhard David <da...@elca.ch>.
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:jesse.mcconnell@gmail.com] 
> 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 <pg...@redhat.com> 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: dev-unsubscribe@maven.apache.org
> >  For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 
> 
> 
> -- 
> jesse mcconnell
> jesse.mcconnell@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Jesse McConnell <je...@gmail.com>.
I think the ! is probably better then D: E: E:

jesse

On Wed, May 14, 2008 at 4:51 PM, Paul Gier <pg...@redhat.com> 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: dev-unsubscribe@maven.apache.org
>  For additional commands, e-mail: dev-help@maven.apache.org
>
>



-- 
jesse mcconnell
jesse.mcconnell@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Paul Gier <pg...@redhat.com>.
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by John Casey <jd...@commonjava.org>.
D/E were meant to work in cases where the - leading character might  
be a problem. If it's never a problem, we don't need them. If the  
only argument to the -P option can be something like "- 
myProfile" (leading dash) then we have no need for it...and the !  
notation might make this even better.

-john

On May 15, 2008, at 11:40 AM, Paul Gier wrote:

> 2.0.x and 2.1 work the same after your change.  "+" means activate  
> and "-" means deactivate.  I'm guessing it was just a typo in 2.1  
> that had them reversed.
>
> What's the reason for the D: and E: syntax?  Do we need these if  
> +,-,!, can be used?
>
>
> John Casey wrote:
>> I looked at the logic for +/- the other day (when I added E: and  
>> D:, fwiw), and the logic was backward, IIRC...I fixed it in 2.1,  
>> but it may still be broken in 2.0.x, not sure...
>> -john
>> On May 14, 2008, at 5:44 PM, 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.
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>> ---
>> John Casey
>> Committer and PMC Member, Apache Maven
>> mail: jdcasey at commonjava dot org
>> blog: http://www.ejlife.net/blogs/john
>> rss: http://feeds.feedburner.com/ejlife/john
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

---
John Casey
Committer and PMC Member, Apache Maven
mail: jdcasey at commonjava dot org
blog: http://www.ejlife.net/blogs/john
rss: http://feeds.feedburner.com/ejlife/john



Re: Profile activation/deactivation

Posted by Paul Gier <pg...@redhat.com>.
2.0.x and 2.1 work the same after your change.  "+" means activate and "-" means 
deactivate.  I'm guessing it was just a typo in 2.1 that had them reversed.

What's the reason for the D: and E: syntax?  Do we need these if +,-,!, can be used?


John Casey wrote:
> I looked at the logic for +/- the other day (when I added E: and D:, 
> fwiw), and the logic was backward, IIRC...I fixed it in 2.1, but it may 
> still be broken in 2.0.x, not sure...
> 
> -john
> 
> On May 14, 2008, at 5:44 PM, 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.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
> 
> ---
> John Casey
> Committer and PMC Member, Apache Maven
> mail: jdcasey at commonjava dot org
> blog: http://www.ejlife.net/blogs/john
> rss: http://feeds.feedburner.com/ejlife/john
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by John Casey <jd...@commonjava.org>.
I looked at the logic for +/- the other day (when I added E: and D:,  
fwiw), and the logic was backward, IIRC...I fixed it in 2.1, but it  
may still be broken in 2.0.x, not sure...

-john

On May 14, 2008, at 5:44 PM, 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

---
John Casey
Committer and PMC Member, Apache Maven
mail: jdcasey at commonjava dot org
blog: http://www.ejlife.net/blogs/john
rss: http://feeds.feedburner.com/ejlife/john



RE: Profile activation/deactivation

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
<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.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Paul Gier <pg...@redhat.com>.
I added a proposal for some profile activation/deactivation improvements here:
http://docs.codehaus.org/display/MAVENUSER/Improvements+to+Profile+Activation+Deactivation

Please take a look and add comments if you are interested.

Thanks!

Paul Gier wrote:
> 
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by Paul Gier <pg...@redhat.com>.
John Casey wrote:
> The activeByDefault flag was originally designed to allow profiles to 
> work as a group, with a default selection. Obviously, it's an incomplete 
> design, since it doesn't allow for profiles that _aren't_ part of that 
> grouping to be activated/deactivated independently. As for the default 
> profiles remaining active until deactivated, I think this would be the 
> most intuitive behavior, though I'd still really like to see profile 
> groups where there can be a default "selection" that is active unless 
> another profile in that group is activated. Also, in the past there has 
> been some quirks with the deactivation flag, that seemed to keep it from 
> working (at least in some cases). No, I don't have specifics, but I can 
> remember it coming up before. :) I think if we straighten out the 
> notation for activating/deactivating, then make sure it works on all 
> platforms (it may have been something about commons-cli snagging on a 
> leading '-' for the deactivation of a single profile), we should make 
> defaults stay active until deactivated. Later, if we find a good 
> mechanism for the profile grouping I was originally striving for, we can 
> implement it in 2.2+ or something.
> 

I think that if we add the possibility of a deactivation configuration 
(MNG-3326) similar to the current activation config we could accomplish the same 
thing as profile groups and the logic to implement it might be a bit simpler.

So for example, you could define a few profiles like this:

<profiles>
   <profile>
     <id>group1-profile1</id>
     <activation>
       <activeByDefault>true</activeByDefault>
     </activation>
     <deactivation>
       <property>
         <name>group1-profile2.on</name>
         <value>true</value>
       </property>
     </deactivation>
   </profile>
   <profile>
     <id>group1-profile2</id>
     <activation>
       <property>
         <name>group1-profile2.on</name>
         <value>true</value>
       </property>
     </activation>
   </profile>
   <profile>
     <id>group2-profile3</id>
     <activation>
       <activeByDefault>true</activeByDefault>
     </activation>
   </profile>
   ...
</profiles>


So in this example, you could use "mvn -Dgroup1.profile2.on=true" and that would 
activate group1.profile2, but deactivate group1.profile1.  If you combine this 
type of deactivation with being able to specify any of the activation or 
deactivation conditions for multiple values, the user would have a lot of 
flexibility to set things up however they want.

And the logic for implementing it could basically be check the activation 
conditions to see if any of them activate the given profile, then check the 
deactivations for the active profiles to see if any of them should be deactivated.


> As for the E: and D: prefixes, this is something I threw in the other 
> day to see if it would improve things. I wasn't sure whether it was a 
> good idea or not, but it's easy enough to take out since nothing has 
> been released. Also, I think having '!' in there is a good idea, even 
> though +/- are already in use. What's the harm in adding more than one 
> way of doing this?
> 
> -john
> 
> On May 14, 2008, at 5:17 PM, Paul Gier wrote:
> 
>>
>> 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: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
> 
> ---
> John Casey
> Committer and PMC Member, Apache Maven
> mail: jdcasey at commonjava dot org
> blog: http://www.ejlife.net/blogs/john
> rss: http://feeds.feedburner.com/ejlife/john
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Profile activation/deactivation

Posted by John Casey <jd...@commonjava.org>.
The activeByDefault flag was originally designed to allow profiles to  
work as a group, with a default selection. Obviously, it's an  
incomplete design, since it doesn't allow for profiles that _aren't_  
part of that grouping to be activated/deactivated independently. As  
for the default profiles remaining active until deactivated, I think  
this would be the most intuitive behavior, though I'd still really  
like to see profile groups where there can be a default "selection"  
that is active unless another profile in that group is activated.  
Also, in the past there has been some quirks with the deactivation  
flag, that seemed to keep it from working (at least in some cases).  
No, I don't have specifics, but I can remember it coming up  
before. :) I think if we straighten out the notation for activating/ 
deactivating, then make sure it works on all platforms (it may have  
been something about commons-cli snagging on a leading '-' for the  
deactivation of a single profile), we should make defaults stay  
active until deactivated. Later, if we find a good mechanism for the  
profile grouping I was originally striving for, we can implement it  
in 2.2+ or something.

As for the E: and D: prefixes, this is something I threw in the other  
day to see if it would improve things. I wasn't sure whether it was a  
good idea or not, but it's easy enough to take out since nothing has  
been released. Also, I think having '!' in there is a good idea, even  
though +/- are already in use. What's the harm in adding more than  
one way of doing this?

-john

On May 14, 2008, at 5:17 PM, Paul Gier wrote:

>
> 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: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

---
John Casey
Committer and PMC Member, Apache Maven
mail: jdcasey at commonjava dot org
blog: http://www.ejlife.net/blogs/john
rss: http://feeds.feedburner.com/ejlife/john