[ http://jira.codehaus.org/browse/MNG-2237?page=all ]

Carlos Sanchez updated MNG-2237:
--------------------------------

    Fix Version: 2.0.5

> Inherited plugin executed twice if child pom merges configuration
> -----------------------------------------------------------------
>
>          Key: MNG-2237
>          URL: http://jira.codehaus.org/browse/MNG-2237
>      Project: Maven 2
>         Type: Bug

>   Components: Inheritence and Interpolation
>     Versions: 2.0.4
>     Reporter: Joerg Schaible
>      Fix For: 2.0.5

>
>
> According the docs the configuration of a plugin is merged, when the plugin 
> is inherited. This actually hapens, but the plugin with the merged 
> configuration is added twice in the effective-pom and therefore executed 
> twice.
> Setup a parent pom with a plugin configuration to attach the javadocs:
> {noformat}
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-javadoc-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <id>attach-javadocs</id>
>                         <goals>
>                             <goal>jar</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>                 <inherited>true</inherited>
>                 <configuration>
>                     <linksource>true</linksource>
>                 </configuration>
>             </plugin>
> {noformat}
> and a child pom that adds additional elements in the configuration:
> {noformat}
>            <plugin>
>                 <artifactId>maven-javadoc-plugin</artifactId>
>                 <configuration>
>                     <links>
>                         <link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
>                         
> <link>http://jakarta.apache.org/commons/logging/commons-logging-1.0.4/docs/apidocs/</link>
>                         <link>http://jmock.codehaus.org/docs/javadoc/</link>
>                         <link>http://www.junit.org/junit/javadoc/3.8.1/</link>
>                     </links>
>                 </configuration>
>             </plugin>
> {noformat}
> In this case the javadoc is generated twice, the goal help:effective-pom 
> reveals, that the plugin was merged, but added twice.

-- 
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

Reply via email to