You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wagon-commits@maven.apache.org by jv...@apache.org on 2004/07/31 17:03:16 UTC

cvs commit: maven-wagon/wagon-api/src/test/java/org/apache/maven/wagon/manager DefaultWagonManagerTest.java WagonA.java WagonB.java WagonC.java

jvanzyl     2004/07/31 08:03:15

  Modified:    wagon-api pom.xml
               wagon-api/src/main/java/org/apache/maven/wagon
                        AbstractWagon.java StreamWagon.java Wagon.java
                        WagonTestCase.java
               wagon-api/src/main/java/org/apache/maven/wagon/repository
                        Repository.java
               wagon-api/src/test/java/org/apache/maven/wagon
                        AbstractWagonTest.java
  Removed:     wagon-api/src/main/java/org/apache/maven/wagon
                        Conductor.java
               wagon-api/src/main/java/org/apache/maven/wagon/artifact
                        Artifact.java DefaultArtifact.java
               wagon-api/src/main/java/org/apache/maven/wagon/artifact/verify
                        ArtifactVerificationException.java
                        ArtifactVerifier.java MD5Verfier.java
                        SHA1Verifier.java
               wagon-api/src/main/java/org/apache/maven/wagon/manager
                        DefaultWagonManager.java WagonManager.java
               wagon-api/src/test/java/org/apache/maven/wagon
                        ConductorTest.java
               wagon-api/src/test/java/org/apache/maven/wagon/artifact/verify
                        SHA1VerifierTest.java
               wagon-api/src/test/java/org/apache/maven/wagon/manager
                        DefaultWagonManagerTest.java WagonA.java
                        WagonB.java WagonC.java
  Log:
  o removing the notions of artifacts
  o removing notions of the wagon manager
  
  Revision  Changes    Path
  1.4       +2 -2      maven-wagon/wagon-api/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/pom.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- pom.xml	16 Jul 2004 00:01:04 -0000	1.3
  +++ pom.xml	31 Jul 2004 15:03:14 -0000	1.4
  @@ -5,12 +5,12 @@
     <parent>
       <groupId>maven</groupId>
       <artifactId>wagon</artifactId>
  -    <version>0.9-SNAPSHOT</version>
  +    <version>1.0-alpha-1-SNAPSHOT</version>
     </parent>
     <groupId>maven</groupId>
     <artifactId>wagon-api</artifactId>
     <name>Wagon API</name>
  -  <version>0.9-SNAPSHOT</version>
  +  <version>1.0-alpha-1-SNAPSHOT</version>
     <description></description>
     <shortDescription>Tools to manage artifacts and deployment</shortDescription>
     <description>
  
  
  
  1.8       +1 -21     maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
  
  Index: AbstractWagon.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractWagon.java	29 Jun 2004 18:14:28 -0000	1.7
  +++ AbstractWagon.java	31 Jul 2004 15:03:15 -0000	1.8
  @@ -17,7 +17,6 @@
    * ====================================================================
    */
   
  -import org.apache.maven.wagon.artifact.Artifact;
   import org.apache.maven.wagon.authentication.AuthenticationException;
   import org.apache.maven.wagon.events.SessionEvent;
   import org.apache.maven.wagon.events.SessionEventSupport;
  @@ -223,25 +222,6 @@
               {
               }
           }
  -    }
  -
  -    // ----------------------------------------------------------------------
  -    //
  -    // ----------------------------------------------------------------------
  -
  -    protected String artifactUrl( Artifact artifact )
  -    {
  -        return source.artifactUrl( artifact );
  -    }
  -
  -    protected String artifactPath( Artifact artifact )
  -    {
  -        return source.artifactPath( artifact );
  -    }
  -
  -    protected String fullArtifactPath( Artifact artifact )
  -    {
  -        return source.fullArtifactPath( artifact );
       }
   
       // ----------------------------------------------------------------------
  
  
  
  1.9       +0 -31     maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/StreamWagon.java
  
  Index: StreamWagon.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/StreamWagon.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StreamWagon.java	3 Jun 2004 18:27:00 -0000	1.8
  +++ StreamWagon.java	31 Jul 2004 15:03:15 -0000	1.9
  @@ -17,7 +17,6 @@
    * ====================================================================
    */
   
  -import org.apache.maven.wagon.artifact.Artifact;
   import org.apache.maven.wagon.authentication.AuthenticationException;
   import org.apache.maven.wagon.authorization.AuthorizationException;
   
  @@ -47,36 +46,6 @@
   
       public abstract void closeConnection()
           throws ConnectionException;
  -
  -    // ----------------------------------------------------------------------
  -    // We take the artifact and create the resource from that so we can
  -    // just hand it off to get(String,File) below. So we might get an
  -    // Artifact where:
  -    //
  -    // groupId = maven
  -    // artifactId = wagon-api
  -    // type = pom
  -    // extension = pom
  -    // version = 1.0
  -    // layout = ${groupId}/{$type}s/${artifactId}-${version}.${extension}
  -    //
  -    // so the resource ends up looking like:
  -    //
  -    // maven/poms/wagon-api-1.0.pom
  -    //
  -    // ----------------------------------------------------------------------
  -
  -    public void get( Artifact artifact, File destination )
  -        throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
  -    {
  -        get( artifactPath( artifact ), destination );
  -    }
  -
  -    public void put( File source, Artifact artifact )
  -        throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
  -    {
  -        put( source, artifactPath( artifact ) );
  -    }
   
       // ----------------------------------------------------------------------
       //
  
  
  
  1.7       +0 -18     maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/Wagon.java
  
  Index: Wagon.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/Wagon.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Wagon.java	3 Jun 2004 18:27:00 -0000	1.6
  +++ Wagon.java	31 Jul 2004 15:03:15 -0000	1.7
  @@ -17,7 +17,6 @@
    * ====================================================================
    */
   
  -import org.apache.maven.wagon.artifact.Artifact;
   import org.apache.maven.wagon.authentication.AuthenticationException;
   import org.apache.maven.wagon.authorization.AuthorizationException;
   import org.apache.maven.wagon.events.SessionListener;
  @@ -39,23 +38,6 @@
   
       void put( File source, String destination )
           throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException;
  -
  -    // ----------------------------------------------------------------------
  -    // Artifact/File handling
  -    // ----------------------------------------------------------------------
  -
  -    void get( Artifact artifact, File destination )
  -        throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException;
  -
  -    void put( File source, Artifact artifact )
  -        throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException;
  -
  -
  -    // ----------------------------------------------------------------------
  -    // /Stream handling
  -    // ----------------------------------------------------------------------
  -
  -    
   
       Repository getRepository();
   
  
  
  
  1.12      +1 -80     maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/WagonTestCase.java
  
  Index: WagonTestCase.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/WagonTestCase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- WagonTestCase.java	29 Jun 2004 18:14:28 -0000	1.11
  +++ WagonTestCase.java	31 Jul 2004 15:03:15 -0000	1.12
  @@ -20,8 +20,6 @@
   import java.io.File;
   import java.io.IOException;
   
  -import org.apache.maven.wagon.artifact.Artifact;
  -import org.apache.maven.wagon.artifact.DefaultArtifact;
   import org.apache.maven.wagon.authentication.AuthenticationInfo;
   import org.apache.maven.wagon.observers.ChecksumObserver;
   import org.apache.maven.wagon.observers.Debug;
  @@ -45,10 +43,6 @@
   
       protected String localRepositoryPath;
   
  -    //protected MavenXpp3Reader modelReader;
  -
  -    protected Artifact artifact;
  -
       protected File sourceFile;
   
       protected File destFile;
  @@ -94,8 +88,6 @@
       {
           resource = "test-resource.txt";
   
  -        //modelReader = new MavenXpp3Reader();
  -
           // ----------------------------------------------------------------------
           // Create the test repository for the wagon we are testing.
           // ----------------------------------------------------------------------
  @@ -185,8 +177,6 @@
   
           fileRoundTripTesting();
   
  -        artifactRoundTripTesting();
  -
           tearDownWagonTestingFixtures();
       }
   
  @@ -259,62 +249,6 @@
           compareContents( sourceFile, destFile );
       }
   
  -    // ----------------------------------------------------------------------
  -    // File <--> Artifact/Repository round trip testing
  -    // ----------------------------------------------------------------------
  -    // 1. Place an artifact in the test repository.
  -    // 2. Get the same artifact that was just placed in the test repository.
  -    // 3. Compare the contents of the file that was place in the test
  -    //    repository with the value of the artifact retrieved from the
  -    //    test repository, they should be the same.
  -    // ----------------------------------------------------------------------
  -
  -    protected void putArtifact()
  -        throws Exception
  -    {
  -        message( "Putting file into test repository " + testRepository );
  -
  -        Wagon wagon = getWagon();
  -
  -        wagon.connect( testRepository );
  -
  -        artifactSourceFile = new File( basedir, POM );
  -
  -        wagon.put( artifactSourceFile, getTestArtifact() );
  -
  -        wagon.disconnect();
  -    }
  -
  -    protected void getArtifact()
  -        throws Exception
  -    {
  -        message( "Getting test artifact from test repository " + testRepository );
  -
  -        Wagon wagon = getWagon();
  -
  -        wagon.connect( testRepository );
  -
  -        artifactDestFile =  FileTestUtils.createUniqueFile( this );
  -
  -        artifactDestFile.deleteOnExit();
  -
  -        wagon.get( getTestArtifact(), artifactDestFile );
  -
  -        wagon.disconnect();
  -    }
  -
  -    protected void artifactRoundTripTesting()
  -        throws Exception
  -    {
  -        message( "Artifact round trip testing ..." );
  -
  -        putArtifact();                
  -
  -        getArtifact();
  -
  -        compareContents( artifactSourceFile, artifactDestFile );
  -    }
  -
       protected void compareContents( File sourceFile, File destFile )
           throws Exception
       {
  @@ -339,19 +273,6 @@
           System.out.println( "OK" );
   
           System.out.println( "---------------------------------------------------------------------------------------------------------" );
  -    }
  -
  -    protected Artifact getTestArtifact()
  -        throws Exception
  -    {
  -        if ( artifact == null )
  -        {
  -            //Model model = modelReader.read( new FileReader( new File( basedir, POM ) ) );
  -
  -            artifact = new DefaultArtifact( "groupId", "artifactId", "1.0", "pom" );
  -        }
  -
  -        return artifact;
       }
   
       // ----------------------------------------------------------------------
  
  
  
  1.5       +1 -43     maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/repository/Repository.java
  
  Index: Repository.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/repository/Repository.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Repository.java	22 Jun 2004 17:35:30 -0000	1.4
  +++ Repository.java	31 Jul 2004 15:03:15 -0000	1.5
  @@ -21,8 +21,6 @@
   import org.apache.maven.wagon.authentication.AuthenticationInfo;
   import org.apache.maven.wagon.WagonConstants;
   import org.apache.maven.wagon.PathUtils;
  -import org.apache.maven.wagon.artifact.Artifact;
  -import org.codehaus.plexus.util.StringUtils;
   
   import java.io.Serializable;
   
  @@ -197,45 +195,5 @@
       public String getProtocol()
       {
           return protocol;
  -    }
  -
  -    public String getLayout()
  -    {
  -        if ( layout == null )
  -        {
  -            return "${groupId}/${type}s/${artifactId}-${version}.${type}";
  -        }
  -
  -        return layout;
  -    }
  -
  -    public String artifactPath( Artifact artifact )
  -    {
  -        return interpolateLayout( artifact.getGroupId(), artifact.getArtifactId(), artifact.getType(), artifact.getVersion() );
  -    }
  -
  -    public String fullArtifactPath( Artifact artifact )
  -    {
  -        return getBasedir() + "/" + artifactPath( artifact );
  -    }
  -
  -    public String artifactUrl( Artifact artifact )
  -    {
  -        return getUrl() + "/" + artifactPath( artifact );
  -    }
  -
  -    private String interpolateLayout( String groupId, String artifactId, String type, String version )
  -    {
  -        String layout = getLayout();
  -
  -        layout = StringUtils.replace( layout, "${groupId}", groupId );
  -
  -        layout = StringUtils.replace( layout, "${artifactId}", artifactId );
  -
  -        layout = StringUtils.replace( layout, "${type}", type );
  -
  -        layout = StringUtils.replace( layout, "${version}", version );
  -
  -        return layout;
       }
   }
  
  
  
  1.6       +4 -8      maven-wagon/wagon-api/src/test/java/org/apache/maven/wagon/AbstractWagonTest.java
  
  Index: AbstractWagonTest.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/src/test/java/org/apache/maven/wagon/AbstractWagonTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractWagonTest.java	9 Jun 2004 03:11:22 -0000	1.5
  +++ AbstractWagonTest.java	31 Jul 2004 15:03:15 -0000	1.6
  @@ -18,8 +18,6 @@
    */
   
   import junit.framework.TestCase;
  -import org.apache.maven.wagon.artifact.Artifact;
  -import org.apache.maven.wagon.artifact.DefaultArtifact;
   import org.apache.maven.wagon.events.MockSessionListener;
   import org.apache.maven.wagon.events.MockTransferListener;
   import org.apache.maven.wagon.repository.Repository;
  @@ -38,12 +36,12 @@
       
       private MockWagon wagon = null;
       
  -    private Artifact artifact;
  -    
       private File destination;
       
       private File source;
  -    
  +
  +    private String artifact;
  +
       private MockSessionListener sessionListener = null;
       
       private MockTransferListener transferListener = null;
  @@ -53,8 +51,6 @@
           super.setUp();
   
           basedir = System.getProperty( "basedir" );
  -
  -        artifact = new DefaultArtifact( "groupId", "artifactId", "version", "type", "extension" );
   
           destination = new File( basedir, "target/folder/subfolder" );
   
  
  
  

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