maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hablutzel1 <hablutz...@GMAIL.COM>
Subject Re: use of plugin and pluginmanagement
Date Fri, 23 May 2014 01:44:36 GMT
So there is an error in the official maven documentation at
http://maven.apache.org/pom.html#Plugin_Management, quoting 

> *If we added these specifications to the plugins element, they would apply
> only to a single POM.*  
> However, if we apply them under the pluginManagement element, then this
> POM and all inheriting POMs that 
> add the maven-jar-plugin to the build will get the pre-process-classes
> execution as well. So rather than the 
> above mess included in every child pom.xml, only the following is
> required:

It is talking about a plugin configuration, but it is not right to state
that adding "plugin" specifications to the "plugins" elements would apply
only *to a single POM*, as adding it to the parent would apply to the parent
and all the childs inheriting from it.

This is confirmed by Wayne Fay post where he indicates the difference of
'pluginManagement' over 'plugins':

> The plugins declared in the build section of your parent will be 
> inherited (and executed) in all of those children poms. In many cases, 
> you might only want a given plugin to actually be used in a few of 
> those children, or even just one, and frequently not in the parent. 

I think that the documentation should say something like this in that
paragraph:

"If we added these specifications to the parent's build/plugins element,
they would apply to the parent and all the inheriting childs which isn't
usually the expected behaviour. However, if we apply them under the parent's
pluginManagement element, then parent's POM and/or inheriting POMs that
added the maven-jar-plugin to the build as shown below will get the
pre-process-classes execution."



--
View this message in context: http://maven.40175.n5.nabble.com/use-of-plugin-and-pluginmanagement-tp3341163p5793777.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message