You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ep...@apache.org on 2003/12/10 22:55:25 UTC

cvs commit: maven-plugins/plugin/xdocs goals.xml changes.xml

epugh       2003/12/10 13:55:24

  Modified:    plugin   plugin.jelly project.xml
               plugin/xdocs goals.xml changes.xml
  Log:
  Fix plugin:download to not delete the plugin just downloaded!
  
  Revision  Changes    Path
  1.26      +10 -19    maven-plugins/plugin/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/plugin/plugin.jelly,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- plugin.jelly	24 Nov 2003 20:46:56 -0000	1.25
  +++ plugin.jelly	10 Dec 2003 21:55:24 -0000	1.26
  @@ -187,7 +187,9 @@
         <echo>repo is '${repo}'</echo>
         <u:file var="localPlugin" 
           name="${maven.home}/plugins/${artifactId}-${version}.jar" />
  -      <j:if test="${!localPlugin.exists()}">
  +      <u:file var="localPluginTempFile" 
  +        name="${maven.home}/plugins/plugin.tmp" />        
  +      <j:if test="${!localPluginTempFile.exists()}">
           <j:set var="remoteFile"
             value="${repo}/${groupId}/plugins/${artifactId}-${version}.jar" />
           <echo>trying to download ${remoteFile}</echo>
  @@ -195,7 +197,7 @@
             <j:invokeStatic var="dummy" method="getFile" 
               className="org.apache.maven.util.HttpUtils">
               <j:arg type="java.lang.String" value="${remoteFile}" />
  -            <j:arg type="java.io.File" value="${localPlugin}"/>
  +            <j:arg type="java.io.File" value="${localPluginTempFile}"/>
               <j:arg type="boolean" value="false"/>
               <j:arg type="boolean" value="true"/>
               <j:arg type="java.lang.String" value="${maven.proxy.host}" />
  @@ -206,30 +208,19 @@
             </j:invokeStatic>
           </j:catch>
         </j:if>
  -      <j:break test="${localPlugin.exists()}"/>
  +      <j:break test="${localPluginTempFile.exists()}"/>
       </j:forEach>
       
  -    <j:set var="downloaded" value="${localPlugin.exists()}"/>
  +    <j:set var="downloaded" value="${localPluginTempFile.exists()}"/>
       <j:if test="${!downloaded}">
         <ant:fail message="Unable to find plug-in" />    
       </j:if>
       <j:if test="${downloaded}">
  -      <echo>Plugin downloaded, removing other versions</echo>
  +      <echo>Plugin downloaded, removing other versions</echo>\
   
  -      <delete verbose="false">
  -        <fileset dir="${maven.home}/plugins">
  -          <include name="${artifactId}-*.jar" />
  -          <exclude name="${artifactId}-${version}.jar" />
  -        </fileset>
  -      </delete>
  -
  -      <delete includeEmptyDirs="true" verbose="false">
  -        <fileset dir="${maven.plugin.unpacked.dir}">
  -          <include name="*.cache"/>
  -          <include name="**/.processed" />
  -          <include name="${artifactId}-*/**" />
  -        </fileset>
  -      </delete>
  +      <attainGoal name="plugin:uninstall"/>
  +      <ant:move file="${localPluginTempFile}"
  +        tofile="${localPlugin}" />      
       </j:if>
     </goal>
   
  
  
  
  1.21      +9 -0      maven-plugins/plugin/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/plugin/project.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- project.xml	30 Sep 2003 23:30:32 -0000	1.20
  +++ project.xml	10 Dec 2003 21:55:24 -0000	1.21
  @@ -33,6 +33,15 @@
           <role>Developer</role>
         </roles>
       </developer>
  +    <developer>
  +      <name>Eric Pugh</name>
  +      <id>epugh</id>
  +      <email>epugh at apache dot org</email>
  +      <organization>OpenSource Connections</organization>
  +      <roles>
  +        <role>Developer</role>
  +      </roles>
  +    </developer>    
     </developers>
     <dependencies>
       <dependency>
  
  
  
  1.4       +4 -0      maven-plugins/plugin/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/plugin/xdocs/goals.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- goals.xml	30 Sep 2003 23:30:32 -0000	1.3
  +++ goals.xml	10 Dec 2003 21:55:24 -0000	1.4
  @@ -43,6 +43,10 @@
           <description>Install the plugin in Maven's plugins dir</description>
         </goal>
         <goal>
  +        <name>plugin:uninstall</name>
  +        <description>Uninstall all versions of the plugin in Maven's plugins dir</description>
  +      </goal>      
  +      <goal>
           <name>plugin:test</name>
           <description>Run a plugin's test project</description>
         </goal>
  
  
  
  1.9       +5 -0      maven-plugins/plugin/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/plugin/xdocs/changes.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- changes.xml	24 Nov 2003 20:46:56 -0000	1.8
  +++ changes.xml	10 Dec 2003 21:55:24 -0000	1.9
  @@ -7,6 +7,11 @@
   
     <body>
       <release version="1.2" date="in CVS">
  +      <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.
  
  
  

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