[ 
https://issues.apache.org/jira/browse/MPH-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074074#comment-16074074
 ] 

Hudson commented on MPH-123:
----------------------------

SUCCESS: Integrated in Jenkins build maven-plugins #9020 (See 
[https://builds.apache.org/job/maven-plugins/9020/])
[MPH-123] all-profiles does not show right active status

MavenProject.getActiveProfiles only considers profiles from the project POM, so 
we also need to get the active profiles from the parents. With Maven 3, while 
it would be possible to use MavenProject.getInjectedProfileIds, it is more 
direct and symmetrical here to walk the parent chain ourselves (and makes sure 
the printed 'source' is consistent for active and inactive profiles from the 
settings). (gboue: [http://svn.apache.org/viewvc/?view=rev&rev=1800814])
* (add) maven-help-plugin/src/it/all-profiles-parent-pom
* (add) maven-help-plugin/src/it/all-profiles-parent-pom/child
* (add) maven-help-plugin/src/it/all-profiles-parent-pom/child/pom.xml
* (add) maven-help-plugin/src/it/all-profiles-parent-pom/invoker.properties
* (add) maven-help-plugin/src/it/all-profiles-parent-pom/pom.xml
* (add) maven-help-plugin/src/it/all-profiles-parent-pom/verify.groovy
* (edit) 
maven-help-plugin/src/main/java/org/apache/maven/plugins/help/AllProfilesMojo.java
* (edit) 
maven-help-plugin/src/test/java/org/apache/maven/plugins/help/AllProfilesMojoTest.java


> all-profiles does not show right active status
> ----------------------------------------------
>
>                 Key: MPH-123
>                 URL: https://issues.apache.org/jira/browse/MPH-123
>             Project: Maven Help Plugin
>          Issue Type: Bug
>          Components: all-profiles
>    Affects Versions: 2.2
>            Reporter: Mahendran Mookkiah
>            Assignee: Guillaume Boué
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: hello-parent.zip, output.txt
>
>
> In multi-module project, help:all-profiles shows profiles of child project 
> are not active. But it is active and the profile plugins get executed.
> whereas active-profiles shows the right status. 
> Attached an example project which executed with below command and snippet of 
> result.
> Command: mvn help:all-profiles help:active-profiles -Pbuild-site
> Output snippet: 
> [INFO] Listing Profiles for Project: 
> com.example:hello-parent:pom:0.0.1-SNAPSHOT
>   Profile Id: build-site (Active: true , Source: pom)
>   Profile Id: artifactory (Active: true , Source: settings.xml)
> Listing Profiles for Project: com.example:helloworld:jar:0.0.1-SNAPSHOT
>   Profile Id: artifactory (Active: true , Source: settings.xml)
>   Profile Id: build-site (Active: false , Source: pom)      
> <<<=========================== shows not active                 
> [INFO]
> [INFO] --- maven-help-plugin:2.2:active-profiles (default-cli) @ hello-parent 
> --
> -
> [INFO]
> Active Profiles for Project 'com.example:hello-parent:pom:0.0.1-SNAPSHOT':
> The following profiles are active:
>  - artifactory (source: external)
>  - build-site (source: com.example:hello-parent:0.0.1-SNAPSHOT)
> Active Profiles for Project 'com.example:helloworld:jar:0.0.1-SNAPSHOT':
> The following profiles are active:
>  - artifactory (source: external)
>  - build-site (source: com.example:hello-parent:0.0.1-SNAPSHOT)  
> <<<=========================== shows active



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to