Wayne,

Thanks for your concise statement. I'm new to maven and have been trying to 
figure out how to use maven by reading the documentation.  What a quagmire.

Maven documentation authors - please study Wayne's concise statement below.  
That is what we need in the Maven documentation.  Not the long-winded, 
stream-of-consciousness that the existing maven docs currently are.


--- On Fri, 1/14/11, Wayne Fay <wayne...@gmail.com> wrote:

From: Wayne Fay <wayne...@gmail.com>
Subject: Re: use of plugin and pluginmanagement
To: "Maven Users List" <users@maven.apache.org>
Date: Friday, January 14, 2011, 9:05 AM

> What extra things <pluginManagement> provides than using only <plugins>.

PluginManagement does ONE THING ONLY (essentially).
It provides a central location for all of your plugin versioning and
configuration.
THAT'S IT.

You still need to declare the <plugin> in the <build> section of your
various poms (children or parents) where you actually want to USE any
of those plugins in your build.

> POM, why is that ? Because the maven
> documentation<http://maven.apache.org/pom.html#Plugin_Management>says
> you need to add plugin entry in your child POM to use that plugin
> (specified in parent POM's pluginManagement section,). I thought I will add
> that plugin in child pom only if I want to change version.

Then you thought wrong.

> CASE2: if I donot use  <pluginManagement> and only use <plugins>:
> ---> In this case also I can get everything I want as above. All child pom
> gets the plugins define in parent pom without adding any entry. OS what's
> the difference?

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.

> So whats the point in going for <pluginManagement>, Is it only to Enforce to
> use same version of plugin and provide some clarity to whole application
> (parent and child) or it is for more than these?

That is essentially the only purpose for pluginManagement.

Wayne

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




      

Reply via email to