[forge-dev] MavenPluginFacet enhancement: smart plugin resolution
Lincoln Baxter, III
lincolnbaxter at gmail.com
Tue Apr 16 14:19:34 EDT 2013
I think this is a really good and very important idea. Actually, we have
something called the "DependencyInstaller.java", which does this same thing
for Dependency instances. It would make sense to have something like a
MavenPluginInstaller as well, I think. So this idea is excellent.
You could probably use that as an example :)
What do you think?
On Fri, Apr 12, 2013 at 8:47 AM, Charles SALMON <salmon.charles at gmail.com>wrote:
> Hello all,
> I recently contributed to the forge project (FORGE-842) by adding the
> pluginManagement support to the mavenPluginFacet.
> One question is still opened, which is the purpose of this post.
> Basically, it is about a smart plugin resolution, ie having the plugin
> properties (artifactId, groupId, version,...) automatically resolved when a
> plugin is defined in a "pluginManagement" section and used in a "plugins"
> Let's take the following example:
> Currently, a call to the
> will return a null value, because the version is not declared in the
> "//build/plugins/plugin" section.
> Maven will, however, resolve the plugin by using the version and
> configuration of the maven-compiler-plugin declared in the
> "//build/pluginManagement/plugins" section.
> Moreover, we should also note that the pluginManagement section will be,
> most of the time, declared in the parent pom, which makes the smart
> resolution as follow:
> 1. Compute the effective pom
> 2. Resolve the plugin properties
> My question is: based on the fact that similar implementation was done
> with Dependency and DependencyManagement sections (in the
> MavenDependencyFacet and DependencyInstaller), which methods should be
> implemented ?
> Following the same logic, we could also thing of a smart "addPlugin"
> method: what if I add a plugin that is already managed, with the same
> version of the managed plugin ? With some configuration element(s) being
> the same as the managed plugin ? ...
> Based on your answers, I will create a FORGE issue and will try to
> implement the missing methods.
> forge-dev mailing list
> forge-dev at lists.jboss.org
Lincoln Baxter, III
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the forge-dev