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-providers/ftp/src/test/java/org/apache/maven/wagon/providers/ftp FtpWagonTest.java FtpWagonTest.xml
Date Sat, 24 Apr 2004 15:54:04 GMT
jvanzyl     2004/04/24 08:54:04

  Modified:    wagon-providers/ftp project.xml
               wagon-providers/ftp/src/main/java/org/apache/maven/wagon/providers/ftp
                        FtpWagon.java
               wagon-providers/ftp/src/test/java/org/apache/maven/wagon/providers/ftp
                        FtpWagonTest.java FtpWagonTest.xml
  Log:
  o mods for file-file transfer
  o adjustment to ftp server configuration to use avalon mode, ftp server
    has been modified to shutdown properly when release is called.
  
  Revision  Changes    Path
  1.3       +1 -2      maven-wagon/wagon-providers/ftp/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-providers/ftp/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml	21 Apr 2004 02:51:40 -0000	1.2
  +++ project.xml	24 Apr 2004 15:54:04 -0000	1.3
  @@ -7,8 +7,7 @@
     <groupId>maven</groupId>
     <artifactId>wagon-ftp</artifactId>
     <name>Wagon FTP Provider</name>
  -  <version>1.0-SNAPSHOT</version>
  -  <currentVersion>1.0-SNAPSHOT</currentVersion>
  +  <version>0.9-SNAPSHOT</version>
     <description></description>
     <shortDescription>Provider for FTP protocol for Wagon</shortDescription>
     <package>org.apache.maven.wagon.providers.ftp</package>
  
  
  
  1.3       +10 -7     maven-wagon/wagon-providers/ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
  
  Index: FtpWagon.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-providers/ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FtpWagon.java	21 Apr 2004 02:51:40 -0000	1.2
  +++ FtpWagon.java	24 Apr 2004 15:54:04 -0000	1.3
  @@ -27,7 +27,6 @@
   import org.apache.maven.wagon.StreamWagon;
   import org.apache.maven.wagon.TransferFailedException;
   import org.apache.maven.wagon.WagonConstants;
  -import org.apache.maven.wagon.artifact.Artifact;
   import org.apache.maven.wagon.authentication.AuthenticationInfo;
   
   import javax.naming.AuthenticationException;
  @@ -158,15 +157,17 @@
           return new String[]{"ftp"};
       }
   
  -    public OutputStream getOutputStream( Artifact artifact )
  +    // ----------------------------------------------------------------------
  +    //
  +    // ----------------------------------------------------------------------
  +
  +    public OutputStream getOutputStream( String resource )
           throws TransferFailedException
       {
           OutputStream os;
   
           try
           {
  -            String resource = artifactPath( artifact );
  -
               String[] dirs = PathUtils.dirnames( resource );
   
               for ( int i = 0; i < dirs.length; i++ )
  @@ -204,12 +205,14 @@
           return os;
       }
   
  -    public InputStream getInputStream( Artifact artifact )
  +    // ----------------------------------------------------------------------
  +    //
  +    // ----------------------------------------------------------------------
  +
  +    public InputStream getInputStream( String resource )
           throws TransferFailedException, ResourceDoesNotExistException
       {
           InputStream is;
  -
  -        String resource = artifactPath( artifact );
   
           try
           {
  
  
  
  1.3       +11 -3     maven-wagon/wagon-providers/ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java
  
  Index: FtpWagonTest.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-providers/ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FtpWagonTest.java	21 Apr 2004 02:51:41 -0000	1.2
  +++ FtpWagonTest.java	24 Apr 2004 15:54:04 -0000	1.3
  @@ -35,6 +35,8 @@
   public class FtpWagonTest
       extends WagonTestCase
   {
  +    private FtpServerInterface server;
  +
       protected String getProtocol()
       {
           return "ftp";
  @@ -45,12 +47,18 @@
       {
           super.setUp();
   
  -        FtpServerInterface server = (FtpServerInterface)lookup( FtpServerInterface.ROLE
);
  +        server = (FtpServerInterface)lookup( FtpServerInterface.ROLE );
  +    }
  +
  +    protected void tearDown()
  +        throws Exception
  +    {
  +        release( server );
       }
   
       protected String getTestRepositoryUrl()
       {
  -        return "ftp://localhost:10021";
  +        return "ftp://localhost:10023";
       }
   
       public AuthenticationInfo getAuthInfo()
  
  
  
  1.2       +5 -29     maven-wagon/wagon-providers/ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.xml
  
  Index: FtpWagonTest.xml
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-providers/ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FtpWagonTest.xml	21 Apr 2004 02:51:41 -0000	1.1
  +++ FtpWagonTest.xml	24 Apr 2004 15:54:04 -0000	1.2
  @@ -30,74 +30,48 @@
       </lifecycle-handlers>
     </lifecycle-handler-manager>
   
  -  <load-on-start>
  -    <component>
  -      <role>org.apache.avalon.cornerstone.services.threads.ThreadManager</role>
  -    </component>
  -    <component>
  -      <role>org.apache.avalon.cornerstone.services.connection.ConnectionManager</role>
  -    </component>
  -    <component>
  -      <role>org.apache.avalon.cornerstone.services.sockets.SocketManager</role>
  -    </component>
  -    <component>
  -      <role>org.apache.ftpserver.usermanager.UserManagerInterface</role>
  -    </component>
  -    <component>
  -      <role>org.apache.ftpserver.ip.IpRestrictorInterface</role>
  -    </component>
  -  </load-on-start>
  -
     <components>
  -
       <component>
         <role>org.apache.avalon.cornerstone.services.threads.ThreadManager</role>
         <implementation>org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager</implementation>
  -
         <configuration>
           <thread-group>
             <name>default</name>
  -
             <!-- normal priority = 5, max-priority = 10 -->
             <priority>5</priority>
  -
             <!-- are threads deamon threads ? -->
             <is-daemon>false</is-daemon>
  -
             <max-threads>40</max-threads>
             <!-- these are ignored at the moment but will be fixed in later revisions
-->
             <min-threads>20</min-threads>
             <min-spare-threads>20</min-spare-threads>
           </thread-group>
         </configuration>
  -
       </component>
   
       <component>
         <role>org.apache.avalon.cornerstone.services.connection.ConnectionManager</role>
         <implementation>org.apache.avalon.cornerstone.blocks.connection.DefaultConnectionManager</implementation>
  -
  +      <!--
         <requirements>
           <requirement>
             <role>org.apache.avalon.cornerstone.services.threads.ThreadManager</role>
           </requirement>
         </requirements>
  +      -->
       </component>
   
       <component>
         <role>org.apache.avalon.cornerstone.services.sockets.SocketManager</role>
         <implementation>org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager</implementation>
  -
         <configuration>
           <server-sockets>
             <factory name="plain" class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory"
/>
           </server-sockets>
  -
           <client-sockets>
             <factory name="plain" class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory"
/>
           </client-sockets>
         </configuration>
  -
       </component>
   
       <component>
  @@ -117,6 +91,7 @@
       <component>
         <role>org.apache.ftpserver.interfaces.FtpServerInterface</role>
         <implementation>org.apache.ftpserver.FtpServerImpl</implementation>
  +      <!--
         <requirements>
           <requirement>
             <role>org.apache.avalon.cornerstone.services.sockets.SocketManager</role>
  @@ -131,11 +106,12 @@
             <role>org.apache.ftpserver.usermanager.UserManagerInterface</role>
           </requirement>
         </requirements>
  +      -->
         <configuration>
           <server-host>localhost</server-host>
           <self-host>localhost</self-host>
           <remote-admin-allowed>false</remote-admin-allowed>
  -	    <ftp-port>10021</ftp-port>
  +	    <ftp-port>10023</ftp-port>
           <default-user-root>${basedir}/target/local-repository</default-user-root>
         </configuration>
       </component>
  
  
  

---------------------------------------------------------------------
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