[jira] (MNG-5369) Inconsistent interaction between activeProfiles and activeByDefault

2013-01-18 Thread Anthony Whitford (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=317593#comment-317593
 ] 

Anthony Whitford commented on MNG-5369:
---

I think I just stumbled on this bug too...  I have a profile defined in the 
{{settings.xml}} with an {{activeByDefault}} set to {{true}}, then the profile 
also has some definition in my corporate parent pom.  Despite the 
{{activeByDefault}}, the profile was not being activated.  I had to add an 
explicit {{active-profiles}} section to make it work.  But I do think this is a 
bug because the documentation suggests that {{activeByDefault}} should work 
fine, {{mvn help:active-profiles}} also reported the profile as active, and 
this was working fine with Maven 2.2.1.

 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




[jira] (MNG-5369) Inconsistent interaction between activeProfiles and activeByDefault

2012-11-07 Thread Ronald Chen (JIRA)
Ronald Chen created MNG-5369:


 Summary: 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




[jira] (MNG-5369) Inconsistent interaction between activeProfiles and activeByDefault

2012-11-07 Thread Ronald Chen (JIRA)

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

Ronald Chen commented on MNG-5369:
--

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




[jira] (MNG-5369) Inconsistent interaction between activeProfiles and activeByDefault

2012-11-07 Thread Ronald Chen (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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




[jira] (MNG-5369) Inconsistent interaction between activeProfiles and activeByDefault

2012-11-07 Thread Ronald Chen (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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:
...
main:
 [echo] 
 [echo] # activated-profile-from-settings-xml #
 [echo] 
...
main:
 [echo] 
 [echo] # activated-by-default #
 [echo] 
...

  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




[jira] (MNG-5369) Inconsistent interaction between activeProfiles and activeByDefault

2012-11-07 Thread JIRA

[ 
https://jira.codehaus.org/browse/MNG-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=313056#comment-313056
 ] 

Jörg Schaible commented on MNG-5369:


Sorry, but you simply did not understand, how profiles work. Maven is 
absolutely right how it behaves. You cannot inherit active profiles from a 
parent, every profile activation is considered on its own in the scope of the 
currently processed POM. Your matrix is simply a proof, that Maven works fine.

 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




[jira] (MNG-5369) Inconsistent interaction between activeProfiles and activeByDefault

2012-11-07 Thread Ronald Chen (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=313057#comment-313057
 ] 

Ronald Chen commented on MNG-5369:
--

Jörg if what you say is true, every case in my matrix should have failed.

The fact that some cases did work is the inconsistency.  Consistency can be 
fixed by flipping the success condition and make all those cases fail.

 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