gnodet edited a comment on pull request #690: URL: https://github.com/apache/maven/pull/690#issuecomment-1064126265
> But why/how does it breaks them? As described in the PR this currently leaks the CCL of the _last_ project in the chain, and even if it makes extensions work somehow it is clearly broken. See https://github.com/apache/maven-build-cache-extension/pull/8 where the build extension test is broken on 3.9.x. I bisected the problem to https://github.com/apache/maven/commit/e327be3d85918a23a5ba48d752143a6dbf8b83f7. The reason is that the extension defines a component with a session scope. This component is defined in the project's classloader (because it's a build extension and not a core extension). This means that when the component is loaded, the projects classloader has to be used, else the component will not be seen by plexus. The previous commit reverts the TCCL to the core maven one before actually building the project. This PR aims at broadening the window where the project's classloader is used, and still revert it at the end. Also, about the _last project_ point, I think in most cases, only the top level project has a specific classloader. The behavior before the previous commit was then that the top level project was used to set the TCCL, and the other projects, not having any specific classloader defined (if not defining any build extension), were simply ignored. -- 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