[
http://jira.codehaus.org/browse/MNG-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_122057
]
Wendy Smoak commented on MNG-3229:
----------------------------------
Apparently there is some debate around this topic. :)
On irc, Brian mentioned that the activeByDefault behavior we are discussing
only works in pom.xml. Then later,
jdcasey: wsmoak: activeByDefault should never work in settings or profiles.xml
jdcasey: you have to use activeProfiles
jdcasey: that's the way it was designed, it was just an oversight to put those
fields in the model for profiles.xml and settings.xml
wsmoak: personally I always use activeProfiles. what I'm seeing is that
activeByDefault *does* (sort of) work in settings.xml -- it activates the
profile.
wsmoak: but you lose the 'deactivate when another profile is specified'
behavior.
jdcasey: hmm
jdcasey: it shouldn't be active at all...that's a bug, at least in the current
design. I know a lot of people disagree on how profiles should work when coming
from external sources, though
With 2.0.8, I am able to activate a profile (permanently!) by using
activeByDefault in settings.xml.
> Active by default profile is ignored when another is specified explicitly.
> ---------------------------------------------------------------------------
>
> Key: MNG-3229
> URL: http://jira.codehaus.org/browse/MNG-3229
> Project: Maven 2
> Issue Type: Bug
> Components: Profiles
> Affects Versions: 2.0.7
> Reporter: Oleksandr Maksymchuk
> Fix For: Documentation Deficit
>
>
> When default profile is added its used only when there is no another profile
> specified to be used on command line via -P option.
> So in the pom containig:
> <profile>
> <id>default</id>
> <activation>
> <activeByDefault>true</activeByDefault>
> </activation>
> <profile>
> <id>dev</id>
> <!-- Not active, should be called explicitly. -->
> default profile is used only when running command without -P dev
> mvn
> but not used when running:
> mvn -P dev
> Expected: should be used in both variants as per doc.
--
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