On 25 Jul 2011, at 17:13, Benson Margulies <bimargul...@gmail.com> wrote:

I don't know about plugin-registry.xml, but you can distribute a
settings.xml for use with -gs that has an active-by-default profile
with a pluginManagement section that does the job.

Benson,
That would do the job though that's not exactly the need. We need the ability to specify the version per plugin, ie using maven-metadata.xml files under each plugin dir (in m2 repo.) I should've more clear in the previous mail. What I've did was trying to activate maven-metadata.XML files by setting the <checkLatest> tag true in p-r.xml file. Plugin-registryxml then will only contain static plugin versions that will be overridden by maven-metadata.xml files. maven-metadata.xml thing should work, I'm missing something important! The issue of using settings.xml is, settings.xml is owned by maven package. therefore the plugin-packages can't update the settings.xml file later on about the newly installed files. That comes in OS world I guess.

Thanks,
Kasun

Ps: Excuse for spelling mistakes, I'm sending this mail via mobile. Facts were not verified.

~~******~~
Kasun Gajasinghe,
University of Moratuwa,
Sri Lanka


On Mon, Jul 25, 2011 at 3:02 AM, Kasun Gajasinghe <kasu...@gmail.com> wrote:
Hi,
I have a requirement where I need to specify specific versions for a
set of (basic) plugins. Adding the versions to the pom isn't an option
because we need to set the plugin versions for a vast number of
_unrelated_ builds.
As I've found at [1], I've manually created a plugin-registry.xml file
with needed plugin versions added. In addition to that, I've created
maven-metadata-local.xml file in the m2 repo under the plugin
directories, pointing to <latest> and <release> versions.

But, unfortunately, these specified versions were not picked up by
mvn. I needed latest maven-compiler-plugin version 2.3.2, but it
always try to use 2.0.2. I've noticed that [1] is somewhat outdated
because --check-plugin-latest parameter doesn't available anymore. So,
I'm asking, does the plugin-registry.xml is still used by maven? If
not what is the mechanism for specifying specific plugin versions
(apart from current/parent pom)?

(I've seen in some posts that the plugin-registry.xml isn't used
anymore, but debug mode shows that mvn retrieves data from that file.
) Apparently, maven-metada-local.xml isn't created automatically for
me either. How I can instruct mvn to do that?

My plugin-registry.xml is at [2]. (There wasn't a template for that.
So, hope the format is correct!). maven-metadata-local.xml of
maven-compiler-plugin is at [3].
I'm using official apache maven-2.2.1 build.

Your help is much appreciated.

[1] 
http://maven.apache.org/guides/introduction/introduction-to-plugin-registry.html
[2] http://pastebin.com/yprQU2D2
[3] http://pastebin.com/Y375dwMg

Thanks,
--Kasun

--
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe,
University of Moratuwa,
Sri Lanka.
Blog: http://blog.kasunbg.org
Twitter: http://twitter.com/kasunbg

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



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


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

Reply via email to