dion        2003/08/03 19:32:35

  Modified:    src/plugins-build/plugin plugin.jelly project.xml
  Log:
  Start of work on a maven plugin:download.
  See MAVEN-536
  
  Revision  Changes    Path
  1.10      +22 -0     maven/src/plugins-build/plugin/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/plugin/plugin.jelly,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- plugin.jelly      28 Jul 2003 06:30:17 -0000      1.9
  +++ plugin.jelly      4 Aug 2003 02:32:35 -0000       1.10
  @@ -1,7 +1,9 @@
   <?xml version="1.0"?>
   
   <project
  +  xmlns:http="jelly:http"
     xmlns:j="jelly:core"
  +  xmlns:maven="jelly:maven"
     xmlns:u="jelly:util"
     xmlns:x="jelly:xml">
   
  @@ -158,5 +160,25 @@
         </j:file>
   
       </j:if>
  +  </goal>
  +  
  +  <!-- download a plugin from a remote repo -->
  +  <goal name="plugin:download">
  +    <maven:param-check value="${artifactId}" fail="true" message="'artifactId' must 
be specified"/>
  +    <maven:param-check value="${groupId}" fail="true" message="'groupId' must be 
specified"/>
  +    <maven:param-check value="${version}" fail="true" message="'version' must be 
specified"/>
  +    <j:set var="repoList">${maven.repo.remote}</j:set>
  +    <u:tokenize var="repos" delim=",">${repoList.trim()}</u:tokenize>
  +    <j:forEach var="repo" items="${repos}">
  +      <echo>repo is '${repo}'</echo>
  +      <u:file var="localPlugin" 
  +        name="${maven.home}/plugins/${artifactId}-${version}.jar" />
  +      <j:if test="${!localPlugin.exists()}">
  +        <j:set var="remoteFile"
  +          value="${repo}/${groupId}/jars/${artifactId}-${version}.jar" />
  +        <echo>trying to download ${remoteFile}</echo>
  +        <http:get uri="${remoteFile}" var="outputVar" />
  +      </j:if>
  +    </j:forEach>
     </goal>
   </project>
  
  
  
  1.15      +12 -0     maven/src/plugins-build/plugin/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/plugin/project.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- project.xml       29 Jul 2003 04:49:40 -0000      1.14
  +++ project.xml       4 Aug 2003 02:32:35 -0000       1.15
  @@ -41,5 +41,17 @@
         <version>20030211.142705</version>
         <url>http://jakarta.apache.org/commons/jelly/libs/xml/</url>
       </dependency>
  +    <dependency>
  +      <groupId>commons-jelly</groupId>
  +      <artifactId>commons-jelly-tags-http</artifactId>
  +      <version>20030211.143043</version>
  +      <url>http://jakarta.apache.org/commons/jelly/libs/http/</url>
  +    </dependency>
  +    <dependency>
  +      <groupId>commons-httpclient</groupId>
  +      <artifactId>commons-httpclient</artifactId>
  +      <version>2.0-rc1</version>
  +      <url>http://jakarta.apache.org/commons/httpclient/</url>
  +    </dependency>
     </dependencies>
   </project>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to