[ http://jira.codehaus.org/browse/MNG-2136?page=comments#action_60499 ] 

John Casey commented on MNG-2136:
---------------------------------

The above example is working as designed. The <activeByDefault/> element is 
meant to specify that this profile will be activated if no other profiles are 
active in the build. Therefore, specific activation of any profile will cause 
this one to be deactivated. The issue with using the logic that the profile 
should always be applied is this:

1. If it's always applied, why not put it in the POM?
2. If it's active-unless-deactivated, how do you deactivate it?

Changing this feature right now might not make a huge impact on the user 
community, but it would break backwards compatibility in the strictest sense. 
Also, it requires defining some mechanism for deactivating profiles. We have 
one undocumented feature for this, which is:

-P -jboss4x

which would explicitly deactivate the jboss4x profileId, but this is not well 
tested, and IMO is pretty specific...I'd say that we would need something akin 
to:

<deactivation>
  <!-- stuff similar to the activation section -->
</deactivation>

where the user can specify conditions that will deactivate the profile. 
Alternately, we could add an element to simply invert the activation 
logic...meaning the profile is active by default if this element is set, but 
anything triggered in the activation section will DEACTIVATE the profile...

I dunno which way we should go with this, but my feeling is that it might have 
to wait for 2.1.

> Active profile in profiles.xml prevents active profile in pom.xml to be 
> triggered automatically
> -----------------------------------------------------------------------------------------------
>
>          Key: MNG-2136
>          URL: http://jira.codehaus.org/browse/MNG-2136
>      Project: Maven 2
>         Type: Bug

>   Components: POM
>     Versions: 2.0.3
>     Reporter: Vincent Massol
>     Priority: Blocker
>      Fix For: 2.0.3

>
>
> If there's a profiles.xml with an active profile in it, then the active 
> profile defined in the pom.xml is ignored and not triggered.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to