[MSHADE-467] Fix concurrency problem with dependency-reduced POM by kriegaex · Pull Request #210 · apache/maven-shade-plugin (original) (raw)
It looks as if running MShade concurrently somehow bleeds MavenSession state into other mojo executions. Therefore, in the lower critical section of ShadeMojo::rewriteDependencyReducedPomIfWeHaveReduction, we use a final static ReentrantLock instance to block concurrent entry to the section.
Code review: Synchronising on session.getProjectBuildingRequest() is less invasive than a global reentrant lock and therefore preferable to the reviewer.
Co-authored-by: Romain Manni-Bucau rmannibucau@gmail.com
Something isn't working
label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})