Maven 2 & 3

<pluginManagement><plugins><plugin><dependencies> do not propogate to child POM plugins (potentially scoped to only affecting child POM plugins that live within a <profile>)

Details

  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

<pluginManagement><plugins><plugin><dependencies> do not propogate to child POM plugins.

Kenny believe this works OKAY if the childs are using the parent <pluginManagement> preconfigured plugins in their main <build> section however it does NOT work if the childs are trying to use those preconfigured plugins via their own <profiles>. Configuration propogates through okay but dependencies are missing and have to be respecified in the child POMs.

Issue Links

Activity

Hide
Brett Porter added a comment -

this needs to be checked from an inheritence perspective, but there's also a chance that it's just a victim of the bug where only plugin dependencies from the first POM activating the plugin are taken (which is a more complicated fix as it pertains to how the plugin classloader is constructed).

In both cases, the workaround is to put the plugins with dependencies in the root POM.

Show
Brett Porter added a comment - this needs to be checked from an inheritence perspective, but there's also a chance that it's just a victim of the bug where only plugin dependencies from the first POM activating the plugin are taken (which is a more complicated fix as it pertains to how the plugin classloader is constructed). In both cases, the workaround is to put the plugins with dependencies in the root POM.
Hide
Brett Porter added a comment -

moving out to 2.1. Even if the management inheritence is incorrect, fixing it won't help a great deal until the classloader construction is fixed

Show
Brett Porter added a comment - moving out to 2.1. Even if the management inheritence is incorrect, fixing it won't help a great deal until the classloader construction is fixed
Hide
Erick Dovale added a comment -

I am hitting this bug.
In my case I have profiles defined in the parent pom of a multi-module project. In the profile's pluginManagement section (db profiles) I defined dependencies for the plugins (db drivers). In the parent pom's pluginManagement section I wanted to defined the version of the plugin to avoid having to repeat this information on every single DB profile. As soon as I did this the dependency defined in the pluginManagement section of the profile got lost in translation.
The solution is then to live with the repeated version for now. The prags would be disappointed.

Show
Erick Dovale added a comment - I am hitting this bug. In my case I have profiles defined in the parent pom of a multi-module project. In the profile's pluginManagement section (db profiles) I defined dependencies for the plugins (db drivers). In the parent pom's pluginManagement section I wanted to defined the version of the plugin to avoid having to repeat this information on every single DB profile. As soon as I did this the dependency defined in the pluginManagement section of the profile got lost in translation. The solution is then to live with the repeated version for now. The prags would be disappointed.

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: