kriegaex commented on code in PR #210:
URL:
https://github.com/apache/maven-shade-plugin/pull/210#discussion_r1460311390
##########
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:
I tried synchronising on both project and session, it is not enough. Feel
free to suggest something better, but after you verified that it works, please.
I can imagine, that somebody who is more experienced in this code base, Maven
plugins in general and concurrency in particular, can come up with a better
solution. But let this one be the benchmark. Before my PR, the bug occurs, now
it is fixed. A better fix is always welcome.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]