Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.2.1
-
None
-
None
Description
Assume the following scenario:
parent
– pom.xml:
...
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.0.1</version>
</plugin>
</plugins>
</pluginManagement>
...
module
– pom.xml:
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
<threshold>Normal</threshold>
<effort>Default</effort>
</configuration>
</plugin>
</plugins>
</reporting>
...
When the parent is installed and you build the module invoking "mvn clean install site", you get org.codehaus.mojo:findbugs-maven-plugin:pom:2.2-SNAPSHOT downloaded instead. This happens for various other plugins. If the plugin is defined in a pluginManagement section, the version is okay, only if you use it in another module which extends the parent and it's not used for reporting. You have to explicitly set the version of the plugin inside the module's reporting section as well, if you would like it not to download the nearest snapshot. This kind of behavior is incorrect, as the whole idea of having a parent pom is to be able to define all versions in it.
I've also tried defining the plugin both in the build and in the reporting sections of the module at the same time (without a hardcoded version). This didn't work.
It is not a blocker bug, but it breaks part of the concept of having centralized dependencies/versions.
Please advise,
Sincerely,
Martin Todorov
Attachments
Issue Links
- duplicates
-
MNG-3385 PluginManagement does not work for report-plugins
- Closed