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


##########
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:
   shade plugins reset it cause it just needs to change it while dumping the 
pom (that said good point it breaks thread safety in concurrent builds).
   agree shade plugin breaks this rules and happy to get it fixed, it is just 
not that important cause shade plugin is generally in the end of the chain (so 
dowstream consumers list is empty) and it also handles itself the pom rewriting 
but you are right.
   long story short: I don't think we should re-read from the filesystem any 
pom model anytime in maven build otherwise the design itself is broken so I'm 
in favor of trying to not use the reader more than once per file.
   
   hope it makes sense.



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