laeubi commented on pull request #690: URL: https://github.com/apache/maven/pull/690#issuecomment-1064186425
> It _was_ leaking : the current PR still reverts at the end of the build. I don't think this is enough... as mentioned in the change, there is even this classloader used later on an further leaked as "the original" one as it is passed to another method call. > I agree that specifying build extensions at various level of a reactor may lead o unpredictable results I think this must be supported without issues, just think about a aggregator build pom that includes different other projects then some might define an extension an other don't. That will lead to failures in this build but not in the individual build. That's really a nightmare to debug and that why I'm a bit strict at those rules to not leaking classloaders. If at some places it is necessary that the project classloader is used it has to be set but reset instantly afterwards! > Actually, the one that cause problems is the [BuildCacheMojosExecutionStrategy](https://github.com/apache/maven-build-cache-extension/blob/master/src/main/java/org/apache/maven/buildcache/BuildCacheMojosExecutionStrategy.java), and yes, it's session scoped because I'm aiming at integrating this extension in `mvnd` which reuses maven plexus realms and thus makes a much bigger difference between `@Singleton` and `@SessionScoped` components. But it seems you are rely on undefined behavior here then and what you wantt to archive could actually only work with a core-extension. -- 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