You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2009/10/30 16:16:26 UTC

[jira] Closed: (MNG-4419) Plugin versions of a reporting section are not inherited from the pluginManagement section of a parent pom and default to nearest *-SNAPSHOT

     [ http://jira.codehaus.org/browse/MNG-4419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4419.
----------------------------------

    Resolution: Duplicate
      Assignee: Benjamin Bentmann

> Plugin versions of a reporting section are not inherited from the pluginManagement section of a parent pom and default to nearest *-SNAPSHOT
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4419
>                 URL: http://jira.codehaus.org/browse/MNG-4419
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, General, POM
>    Affects Versions: 2.2.1
>            Reporter: Martin Todorov
>            Assignee: Benjamin Bentmann
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira