PR: MPPLUGIN-12
make uninstall delete the correct plugin when running plugin:download git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114842 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3039d79877
commit
0a4e07c704
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<project
|
<project
|
||||||
|
xmlns:plugin="plugin"
|
||||||
xmlns:ant="jelly:ant"
|
xmlns:ant="jelly:ant"
|
||||||
xmlns:j="jelly:core"
|
xmlns:j="jelly:core"
|
||||||
xmlns:maven="jelly:maven"
|
xmlns:maven="jelly:maven"
|
||||||
@ -38,9 +39,11 @@
|
|||||||
|
|
||||||
</goal>
|
</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">
|
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"
|
<copy file="${maven.build.dir}/${maven.final.name}.jar"
|
||||||
todir="${maven.home}/plugins"/>
|
todir="${maven.home}/plugins"/>
|
||||||
|
|
||||||
@ -49,20 +52,7 @@
|
|||||||
<goal name="plugin:uninstall"
|
<goal name="plugin:uninstall"
|
||||||
description="Uninstall all versions of the plugin">
|
description="Uninstall all versions of the plugin">
|
||||||
|
|
||||||
<delete verbose="false" failonerror="false">
|
<plugin:uninstall name="${pom.artifactId}" />
|
||||||
<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>
|
</goal>
|
||||||
|
|
||||||
<goal name="plugin:deploy" prereqs="plugin"
|
<goal name="plugin:deploy" prereqs="plugin"
|
||||||
@ -194,7 +184,7 @@
|
|||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<goal name="plugin:download" description="download and install a plugin from a remote repo" prereqs="plugin:download-artifact">
|
<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" />
|
<u:file var="localPlugin" name="${maven.home}/plugins/${artifactId}-${version}.jar" />
|
||||||
<ant:copy file="${localPluginFile}" tofile="${localPlugin}" />
|
<ant:copy file="${localPluginFile}" tofile="${localPlugin}" />
|
||||||
</goal>
|
</goal>
|
||||||
@ -266,6 +256,24 @@
|
|||||||
/>
|
/>
|
||||||
</goal>
|
</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:taglib uri="assert">
|
||||||
<define:tag name="assertFileExists">
|
<define:tag name="assertFileExists">
|
||||||
<!-- @file : Full file path -->
|
<!-- @file : Full file path -->
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<pomVersion>3</pomVersion>
|
<pomVersion>3</pomVersion>
|
||||||
<id>maven-plugin-plugin</id>
|
<id>maven-plugin-plugin</id>
|
||||||
<name>Maven Plugin Plugin</name>
|
<name>Maven Plugin Plugin</name>
|
||||||
<currentVersion>1.2</currentVersion>
|
<currentVersion>1.3-SNAPSHOT</currentVersion>
|
||||||
<description/>
|
<description/>
|
||||||
<shortDescription>Maven Plugin plugin</shortDescription>
|
<shortDescription>Maven Plugin plugin</shortDescription>
|
||||||
<url>http://maven.apache.org/reference/plugins/plugin/</url>
|
<url>http://maven.apache.org/reference/plugins/plugin/</url>
|
||||||
|
|||||||
@ -24,6 +24,12 @@
|
|||||||
<author email="evenisse@ifrance.com">Emmanuel Venisse</author>
|
<author email="evenisse@ifrance.com">Emmanuel Venisse</author>
|
||||||
</properties>
|
</properties>
|
||||||
<body>
|
<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">
|
<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="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>
|
<action dev="vmassol" type="add">Added assert:assertEquals tag to verify if two values are equal while testing a plugin.</action>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user