Hi Jim,

Jim Sellers wrote at Donnerstag, 14. Mai 2009 22:37:

> Hi all.
> 
> I've got a question for how to best configure plugins in a corporate
> parent
> pom.  One way is to configure the plug in the pluginManagement section,
> the other is to use the properties that the plugin uses.
> 
> eg.
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-eclipse-plugin</artifactId>
>           <configuration>
>             <wtpmanifest>true</wtpmanifest>
>             <wtpapplicationxml>true</wtpapplicationxml>
>             <wtpversion>2.0</wtpversion>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> 
> vs
> 
>   <properties>
>         <!-- WTP properties used by the maven-eclipse-plugin -->
>         <eclipse.wtpmanifest>true</eclipse.wtpmanifest>
>         <eclipse.wtpapplicationxml>true</eclipse.wtpapplicationxml>
>         <wtpversion>2.0</wtpversion>
>   </properties>
> 
> Is there any advantage of one over the other?

You're comparing apples and pears. An entry in the pluginManagement simply
defines the default configuration that is used, if somebody uses that
plugin in his build. Actually we're combining both methods (well, not for
the version, but for important configuration elements), so you're able to
influence the default configuration by overriding a property definition
with a local entry.

Play with help:effective-pom to see the results.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to