Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.5
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Linux (Debian), Maven 1.1
-
Number of attachments :
Description
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!
Apply it using the following command line:
patch -p1 -i ../maven-plugin-plugin-installation.patch