croister commented on a change in pull request #5: [MPH-164] - Effective-pom 
ignores artifact argument
URL: https://github.com/apache/maven-help-plugin/pull/5#discussion_r390197733
 
 

 ##########
 File path: src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
 ##########
 @@ -111,6 +112,7 @@ public void execute()
         if ( StringUtils.isNotEmpty( artifact ) )
         {
             project = getMavenProject( artifact );
+            projects = Collections.emptyList();
 
 Review comment:
   If you run "mvn help:effective-pom 
-Dartifact=org.apache.maven.plugins:maven-help-plugin" in a folder with a 
simple pom (no modules defined in the pom) it will output the effective pom for 
the maven-help-plugin as expected.
   But if you run the same command in a folder with a more complex pom (where 
there are one or more modules defined in the pom) it will output the effective 
pom for these insted of the expected output.
   This is caused by "artifact" only overriding the "project" variable and not 
the "projects" variable.
   Thinking about it again now I should probably set "projects" to be a list 
only containing the "artifact". Will update the commit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to