rmannibucau commented on code in PR #129:
URL: https://github.com/apache/maven-shade-plugin/pull/129#discussion_r843924166


##########
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##########
@@ -1090,7 +1092,10 @@ private void createDependencyReducedPom( Set<String> 
artifactsToRemove )
             origDeps = transitiveDeps;
         }
 
-        Model model = project.getOriginalModel();
+        final Model model = project.getFile() == null

Review Comment:
   Hmm, I just checked flatten code and it only works if `updatePomFile` is set 
to true no? So long story short, if you want it to work reliably you must 
ensure originalModel is set before shade plugin is executed. From a design 
point of view it is the responsability of flatten plugin to do that since it is 
the one hacking the user pom but an intermediary plugin setting it from a file 
when flatten plugin dumped its value would work too but I don't think there is 
any bug in shade there.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to