[ 
https://jira.codehaus.org/browse/MNG-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313048#comment-313048
 ] 

Ronald Chen edited comment on MNG-5369 at 11/7/12 3:53 PM:
-----------------------------------------------------------

Sorry I left out one thing.  For all 6 projects given the command "mvn validate 
-s settings.xml -f sub-parent/project/pom.xml" I expect to see the following 
output:
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building project 1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-antrun-plugin:1.7:run (ant-echo-1) @ project ---
[INFO] Executing tasks

main:
     [echo] 
     [echo] ##### activated-profile-from-settings-xml #####
     [echo] 
[INFO] Executed tasks
[INFO] 
[INFO] --- maven-antrun-plugin:1.7:run (ant-echo-2) @ project ---
[INFO] Executing tasks

main:
     [echo] 
     [echo] ##### activated-by-default #####
     [echo] 
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.984s
[INFO] Finished at: Wed Nov 07 13:53:30 PST 2012
[INFO] Final Memory: 3M/117M
[INFO] ------------------------------------------------------------------------

                
      was (Author: pyrolistical):
    Sorry I left out one thing.  For all 6 projects given the command "mvn 
validate -s settings.xml -f sub-parent/project/pom.xml" I expect to see the 
following output:
...
main:
     [echo] 
     [echo] ##### activated-profile-from-settings-xml #####
     [echo] 
...
main:
     [echo] 
     [echo] ##### activated-by-default #####
     [echo] 
...
                  
> Inconsistent interaction between activeProfiles and activeByDefault
> -------------------------------------------------------------------
>
>                 Key: MNG-5369
>                 URL: https://jira.codehaus.org/browse/MNG-5369
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Profiles, Settings
>    Affects Versions: 3.0.4
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 00:44:56-0800)
> Maven home: /home/rchen/dev/tools/apache-maven-3.0.4
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Java home: /home/rchen/dev/tools/jdk1.6.0_26/jre
> Default locale: en_CA, platform encoding: UTF-8
> OS name: "linux", version: "2.6.36-020636-generic", arch: "amd64", family: 
> "unix"
>            Reporter: Ronald Chen
>         Attachments: maven-active-by-default-parent.tar.gz, 
> maven-profiles-bug.png
>
>
> I have two profiles.  One is activated by activeProfiles in settings.xml and 
> the other is activeByDefault = true
> They are both expected to be active as I am not using -P in my commands.
> The bug is there are some cases in which the activeByDefault profile is not 
> active.
> It seems like whenever both profiles are located in the same pom, the 
> activeByDefault profile is no longer active.  But moving the activeProfiles 
> profile up into a parent pom or moving the activeByDefault profile down to a 
> module both seems to work.
> Its a rather complicated to describe, so I have attached 6 sample projects 
> which illustrates various scenarios.  I've summarized the results in the 
> attached image.
> You can also run all the projects with the command:
> ls -1 | xargs --verbose -I CASE mvn -f CASE/sub-parent/project/pom.xml 
> validate -s CASE/settings.xml |grep -vP '^\[INFO\]'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to