brett 2004/03/08 14:26:11
Modified: plugin plugin.jelly project.xml
plugin/xdocs changes.xml
Log:
PR: MPPLUGIN-12
make uninstall delete the correct plugin when running plugin:download
Revision Changes Path
1.32 +26 -18 maven-plugins/plugin/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/plugin/plugin.jelly,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- plugin.jelly 4 Mar 2004 18:37:55 -0000 1.31
+++ plugin.jelly 8 Mar 2004 22:26:11 -0000 1.32
@@ -19,6 +19,7 @@
<project
+ xmlns:plugin="plugin"
xmlns:ant="jelly:ant"
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
@@ -38,9 +39,11 @@
</goal>
- <goal name="plugin:install" prereqs="plugin,plugin:uninstall"
+ <goal name="plugin:install" prereqs="plugin"
description="Install the plugin jar, prepare Maven to expand it locally and
clear caches">
+ <plugin:uninstall name="${pom.artifactId}" />
+
<copy file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.home}/plugins"/>
@@ -48,23 +51,10 @@
<goal name="plugin:uninstall"
description="Uninstall all versions of the plugin">
-
- <delete verbose="false" failonerror="false">
- <fileset dir="${maven.home}/plugins">
- <include name="${pom.artifactId}-*.jar" />
- </fileset>
- </delete>
-
- <delete includeEmptyDirs="true" verbose="false" failonerror="false">
- <fileset dir="${maven.plugin.unpacked.dir}">
- <include name="*.cache"/>
- <include name="**/.processed" />
- <include name="${pom.artifactId}-*/**" />
- </fileset>
- </delete>
-
- </goal>
+ <plugin:uninstall name="${pom.artifactId}" />
+ </goal>
+
<goal name="plugin:deploy" prereqs="plugin"
description="Install a specific unpacked plugin but no new jar">
@@ -194,7 +184,7 @@
</goal>
<goal name="plugin:download" description="download and install a plugin from a
remote repo" prereqs="plugin:download-artifact">
- <attainGoal name="plugin:uninstall"/>
+ <plugin:uninstall name="${artifactId}" />
<u:file var="localPlugin"
name="${maven.home}/plugins/${artifactId}-${version}.jar" />
<ant:copy file="${localPluginFile}" tofile="${localPlugin}" />
</goal>
@@ -266,6 +256,24 @@
/>
</goal>
+ <define:taglib uri="plugin">
+ <define:tag name="uninstall">
+ <ant:delete verbose="false" failonerror="false">
+ <ant:fileset dir="${maven.home}/plugins">
+ <ant:include name="${name}-*.jar" />
+ </ant:fileset>
+ </ant:delete>
+
+ <ant:delete includeEmptyDirs="true" verbose="false" failonerror="false">
+ <ant:fileset dir="${maven.plugin.unpacked.dir}">
+ <ant:include name="*.cache"/>
+ <ant:include name="**/.processed" />
+ <ant:include name="${name}-*/**" />
+ </ant:fileset>
+ </ant:delete>
+ </define:tag>
+ </define:taglib>
+
<define:taglib uri="assert">
<define:tag name="assertFileExists">
<!-- @file : Full file path -->
1.26 +1 -1 maven-plugins/plugin/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven-plugins/plugin/project.xml,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- project.xml 7 Mar 2004 00:40:41 -0000 1.25
+++ project.xml 8 Mar 2004 22:26:11 -0000 1.26
@@ -23,7 +23,7 @@
<pomVersion>3</pomVersion>
<id>maven-plugin-plugin</id>
<name>Maven Plugin Plugin</name>
- <currentVersion>1.2</currentVersion>
+ <currentVersion>1.3-SNAPSHOT</currentVersion>
<description/>
<shortDescription>Maven Plugin plugin</shortDescription>
<url>http://maven.apache.org/reference/plugins/plugin/</url>
1.14 +6 -0 maven-plugins/plugin/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/plugin/xdocs/changes.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- changes.xml 7 Mar 2004 00:40:41 -0000 1.13
+++ changes.xml 8 Mar 2004 22:26:11 -0000 1.14
@@ -24,6 +24,12 @@
<author email="[EMAIL PROTECTED]">Emmanuel Venisse</author>
</properties>
<body>
+ <release version="1.3-SNAPSHOT" date="in CVS">
+ <action dev="brett" type="fix" issue="MPPLUGIN-12">
+ Don't uninstall incorrect plugins when running plugin:download
+ </action>
+ </release>
+
<release version="1.2" date="2004-03-07">
<action dev="epugh" type="update">Fixed the plugin:download goal to work.
Previously it would delete the plugin you just downloaded. Also now leverages the
plugin:uninstall goal.</action>
<action dev="vmassol" type="add">Added assert:assertEquals tag to verify if
two values are equal while testing a plugin.</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]