kriegaex commented on code in PR #210:
URL: 
https://github.com/apache/maven-shade-plugin/pull/210#discussion_r1460668776


##########
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##########
@@ -1112,15 +1116,21 @@ private void 
rewriteDependencyReducedPomIfWeHaveReduction(
                     w.close();
                 }
 
-                ProjectBuildingRequest projectBuildingRequest =
-                        new 
DefaultProjectBuildingRequest(session.getProjectBuildingRequest());
-                
projectBuildingRequest.setLocalRepository(session.getLocalRepository());
-                
projectBuildingRequest.setRemoteRepositories(project.getRemoteArtifactRepositories());
+                // Lock critical section to fix MSHADE-467
+                try {

Review Comment:
   LGTM, thanks for the great input. I made sure your authorship was respected 
in the latest commit. The CI build on my fork is passing. Before merging, would 
you like me to squash our two solutions into one commit? I wwould prefer to 
keep both commits for reference and to see the code evolution. Should the 
necessity for a reentrant lock arise in the future, at least we have an 
example. We also have one already for what is generally preferable, like in 
this case. As I cannot merge myself, I leave it up to you to decide.



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