Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins should be registered as build extensions #1

Open
cstamas opened this issue Jun 25, 2022 · 0 comments
Open

Plugins should be registered as build extensions #1

cstamas opened this issue Jun 25, 2022 · 0 comments

Comments

@cstamas
Copy link

cstamas commented Jun 25, 2022

For this to work, plugins must be registered as build extensions <extensions>true</extensions> see https://gist.github.com/cstamas/191a6bb660c7b1cca1a325248af30d1f

Once apache/maven-install-plugin#15 and apache/maven-deploy-plugin#20 is merged/released, then this trick above will not be needed anymore.

Reason: current "naive" atEnd implementation uses static member https://github.com/apache/maven-install-plugin/blob/master/src/main/java/org/apache/maven/plugins/install/InstallMojo.java#L58 but as Mojo class-loaders are re-created per module (by different conditions), the static is "lost" as in case of new class-loader, the old data is not there. Hence, as extension force Maven to load plugins once, and keep it throughout the build, and that makes static member "live" thru whole build,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant