[ http://jira.codehaus.org/browse/MPPLUGIN-30?page=all ]
Lukas Theussl updated MPPLUGIN-30:
----------------------------------
Fix Version: 1.7.1
Can't we simply add a property to choose whether plugins get installed in
maven.plugin.dir or maven.plugin.user.dir?
> Plugins on a per-user basis
> ---------------------------
>
> Key: MPPLUGIN-30
> URL: http://jira.codehaus.org/browse/MPPLUGIN-30
> Project: maven-plugin-plugin
> Type: Bug
> Versions: 1.5
> Environment: Linux (Debian), Maven 1.1
> Reporter: Rodrigo S. de Castro
> Fix For: 1.7.1
> Attachments: maven-plugin-plugin-installation.patch
>
>
> Problem:
> When I try to compile Geronimo, it fails when trying to install its plugin
> into the $MAVEN_HOME directory, since it is a shared installation in
> /usr/local/maven-1.1. It does not install the plugins on a per-user basis to
> my maven local directory (~/.maven). Is this the intended behaviour?
> Analysis:
> In the org.apache.maven.plugin.PluginManager class, which is called for
> plugin:install-now, the plugin is installed in the user plugins dir, as we
> may check through the following code:
> if ( cache )
> {
> FileUtils.copyFileToDirectory( file, userPluginsDir );
> cacheManager.registerPlugin( pluginName, housing );
> housing.parse( cacheManager );
> cacheManager.saveCache( unpackedPluginsDir );
> }
> Since I am not sure if the behaviour was intentional, I would like to know
> your opinion about that.
> From the point of view that there is an inconsistent behaviour, I will attach
> a patch that changes plugin:install to do the same as plugin:install-now:
> install in the user directory. With this patch, current repository version of
> Apache Geronimo works properly.
> Concerning plugin removal, the code already check both directories (global
> and user), as you may check here (plugin/plugin.jelly):
> <define:tag name="uninstall">
> <ant:delete verbose="false" failonerror="false">
> <ant:fileset dir="${maven.plugin.dir}">
> <ant:include name="${name}-*.jar" />
> </ant:fileset>
> <ant:fileset dir="${maven.plugin.user.dir}">
> <ant:include name="${name}-*.jar" />
> </ant:fileset>
> </ant:delete>
> Thank you!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]