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


##########
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:
   My guess is that it was the really original file but since maven is a chain 
(per module) it is in practise the current pom file - otherwise it can't really 
be used by any plugins and some do.
   So guess the choice is:
   
   1. keep original untouched but means no plugin should use it except 
help/debug ones (so fix is to always read getFile())
   2. ensure flatten plugin updates original model to let downstream plugins 
consumes the post processing model
   
   Personally I think the option 2 is what makes the most sense for the 
ecosystem (inter-plugin operability).



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