Skip to content

Plugins should be registered as build extensions #1

@cstamas

Description

@cstamas

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions