maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: maven-wagon/wagon-ant/src/test/resources/ant build.xml
Date Sun, 25 Apr 2004 14:20:01 GMT
jvanzyl     2004/04/25 07:20:01

  Added:       wagon-ant/src/main/java/org/apache/maven/wagon/ant
                        WagonTask.java
               wagon-ant/src/test/resources/ant build.xml
  Log:
  o adding start of ant support for wagon.
  
  Revision  Changes    Path
  1.1                  maven-wagon/wagon-ant/src/main/java/org/apache/maven/wagon/ant/WagonTask.java
  
  Index: WagonTask.java
  ===================================================================
  package org.apache.maven.wagon.ant;
  
  import org.apache.tools.ant.Task;
  import org.apache.tools.ant.BuildException;
  import org.apache.maven.wagon.Conductor;
  import org.apache.maven.wagon.repository.Repository;
  
  /**
   * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
   * @version $Id: WagonTask.java,v 1.1 2004/04/25 14:20:01 jvanzyl Exp $
   */
  public class WagonTask
      extends Task
  {
      private String mode;
  
      private String repository;
  
      private String source;
  
      private String destination;
  
      // ----------------------------------------------------------------------
      //
      // ----------------------------------------------------------------------
  
      public void setMode( String mode )
      {
          this.mode = mode;
      }
  
      public void setRepository( String repository )
      {
          this.repository = repository;
      }
  
      public void setSource( String source )
      {
          this.source = source;
      }
  
      public void setDestination( String destination )
      {
          this.destination = destination;
      }
  
      // ----------------------------------------------------------------------
      //
      // ----------------------------------------------------------------------
  
      public void execute()
          throws BuildException
      {
          Conductor conductor;
  
          try
          {
              conductor = new Conductor();
          }
          catch ( Exception e )
          {
              throw new BuildException( "Cannot start the wagon conductor.", e );
          }
  
          Repository r = new Repository();
  
          r.setUrl( repository );
      }
  }
  
  
  
  1.1                  maven-wagon/wagon-ant/src/test/resources/ant/build.xml
  
  Index: build.xml
  ===================================================================
  <project default="wagon">
  
    <target name="wagon">
  
      <path id="wagon.classpath">
        <fileset dir="/home/jvanzyl/maven-repo-local/maven/jars">
          <include name="**/*.jar"/>
        </fileset>
      </path>
  
      <taskdef
        name="wagon"
        class="org.apache.maven.wagon.ant.WagonTask">
        <classpath refid="wagon.classpath"/>
      </taskdef>
  
      <wagon
        mode="get"
        repository="http://www.ibibilio.org/maven"
        source="maven/poms/wagon-api-0.9-SNAPSHOT.pom"
        destination="/tmp/foo"/>
  
    </target>
  </project>
  
  

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


Mime
View raw message