[maven-release-plugin] copy for tag wagon-1.0
git-svn-id: https://svn.apache.org/repos/asf/maven/wagon/tags/wagon-1.0@1143602 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 6e47597..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-target
-
-#idea
-*.iml
-
-#eclipse
-.project
-.classpath
-.settings
diff --git a/pom.xml b/pom.xml
index 1b9f667..3bb49d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,13 +23,13 @@
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.apache.maven</groupId>
- <version>19</version>
+ <version>20</version>
<relativePath>../pom/maven/pom.xml</relativePath>
</parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<packaging>pom</packaging>
<name>Maven Wagon</name>
@@ -47,14 +47,6 @@
<role>Developer</role>
</roles>
</developer>
- <developer>
- <id>struberg</id>
- <name>Mark Struberg</name>
- <email>struberg@apache.org</email>
- <roles>
- <role>Developer</role>
- </roles>
- </developer>
</developers>
<contributors>
<contributor>
@@ -114,73 +106,20 @@
<contributor>
<name>Thorsten Heit</name>
</contributor>
+ <contributor>
+ <name>Benson Margulies</name>
+ <email>bimargulies@apache.org</email>
+ <roles>
+ <role>Committer</role>
+ </roles>
+ <timezone>America/Boston</timezone>
+ </contributor>
</contributors>
- <mailingLists>
- <mailingList>
- <name>Maven Developer List</name>
- <subscribe>dev-subscribe@maven.apache.org</subscribe>
- <unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
- <post>dev@maven.apache.org</post>
- <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
- <otherArchives>
- <otherArchive>http://www.mail-archive.com/dev@maven.apache.org/</otherArchive>
- <otherArchive>http://old.nabble.com/Maven-Developers-f179.html</otherArchive>
- <otherArchive>http://maven.dev.markmail.org/</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Maven User List</name>
- <subscribe>users-subscribe@maven.apache.org</subscribe>
- <unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
- <post>users@maven.apache.org</post>
- <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
- <otherArchives>
- <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
- <otherArchive>http://old.nabble.com/Maven---Users-f178.html</otherArchive>
- <otherArchive>http://maven.users.markmail.org/</otherArchive>
- </otherArchives>
- </mailingList>
-
- <mailingList>
- <name>LEGACY Wagon User List (deprecated)</name>
- <post>wagon-users@maven.apache.org</post>
- <subscribe>wagon-users-subscribe@maven.apache.org</subscribe>
- <unsubscribe>wagon-users-unsubscribe@maven.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/maven-wagon-users/</archive>
- <otherArchives>
- <otherArchive>http://www.mail-archive.com/wagon-users@maven.apache.org</otherArchive>
- <otherArchive>http://old.nabble.com/Wagon---Users-f13870.html</otherArchive>
- <otherArchive>http://maven.wagon.users.markmail.org/</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>LEGACY Wagon Developer List (deprecated)</name>
- <post>wagon-dev@maven.apache.org</post>
- <subscribe>wagon-dev-subscribe@maven.apache.org</subscribe>
- <unsubscribe>wagon-dev-unsubscribe@maven.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/maven-wagon-dev/</archive>
- <otherArchives>
- <otherArchive>http://www.mail-archive.com/wagon-dev@maven.apache.org</otherArchive>
- <otherArchive>http://old.nabble.com/Wagon---Dev-f13871.html</otherArchive>
- <otherArchive>http://maven.wagon.dev.markmail.org/</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Wagon Commits List</name>
- <subscribe>wagon-commits-subscribe@maven.apache.org</subscribe>
- <unsubscribe>wagon-commits-unsubscribe@maven.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/maven-wagon-commits/</archive>
- <otherArchives>
- <otherArchive>http://maven.wagon.commits.markmail.org/</otherArchive>
- </otherArchives>
- </mailingList>
- </mailingLists>
-
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/maven/wagon/trunk</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/wagon/trunk</developerConnection>
- <url>http://svn.apache.org/viewvc/maven/wagon/trunk</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/wagon/tags/wagon-1.0</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/wagon/tags/wagon-1.0</developerConnection>
+ <url>http://svn.apache.org/viewvc/maven/wagon/tags/wagon-1.0</url>
</scm>
<issueManagement>
<system>jira</system>
@@ -188,10 +127,9 @@
</issueManagement>
<ciManagement>
<system>Jenkins</system>
- <url>https://builds.apache.org/job/maven-wagon/</url>
+ <url>https://builds.apache.org/hudson/job/maven-wagon/</url>
</ciManagement>
-
<modules>
<module>wagon-provider-api</module>
<module>wagon-providers</module>
@@ -210,7 +148,6 @@
<scope>test</scope>
</dependency>
</dependencies>
-
<dependencyManagement>
<dependencies>
<dependency>
@@ -236,7 +173,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.2</version>
+ <version>3.8.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -260,40 +197,13 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
- <version>1.5.5</version>
+ <version>1.0-alpha-9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>2.0.7</version>
- </dependency>
-
- <!-- for slf4j -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.6.1</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>1.6.1</version>
- <scope>test</scope>
- </dependency>
-
-
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>1.2_Java1.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <version>6.1.26</version>
+ <version>1.4.2</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -314,20 +224,16 @@
<stagingSiteURL>scp://people.apache.org/www/maven.apache.org/wagon-${project.version}</stagingSiteURL>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-maven-plugin</artifactId>
+ <!-- the one in maven-parent-10 and after is no longer backward compatible-->
+ <version>1.3.5</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<executions>
@@ -339,20 +245,13 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.8.1</version>
- </plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
<configuration>
<links>
<link>http://java.sun.com/j2ee/1.4/docs/api</link>
diff --git a/src/site/site.xml b/src/site/site.xml
index eccb050..5735464 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -21,8 +21,15 @@
<project>
<version position="right" />
+ <!-- TODO remove when using Maven Parent 11+ -->
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-stylus-skin</artifactId>
+ <version>1.1</version>
+ </skin>
+
<body>
<menu ref="modules" />
<menu ref="reports" />
</body>
-</project>
+</project>
\ No newline at end of file
diff --git a/wagon-provider-api/pom.xml b/wagon-provider-api/pom.xml
index 1afefd6..d2bc0ff 100644
--- a/wagon-provider-api/pom.xml
+++ b/wagon-provider-api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -39,6 +39,7 @@
<dependency>
<groupId>easymock</groupId>
<artifactId>easymock</artifactId>
+ <version>1.2_Java1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/WagonUtils.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/WagonUtils.java
index 28f171d..35e7194 100644
--- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/WagonUtils.java
+++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/WagonUtils.java
@@ -19,13 +19,13 @@
* under the License.
*/
-import org.apache.maven.wagon.authorization.AuthorizationException;
-import org.codehaus.plexus.util.FileUtils;
-
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
+import org.apache.maven.wagon.authorization.AuthorizationException;
+import org.codehaus.plexus.util.FileUtils;
+
/**
* @author <a href="mailto:mmaczka@interia.pl">Michal Maczka</a>
* @version $Id$
@@ -49,7 +49,9 @@
wagon.get( resource, file );
- return FileUtils.fileRead( file );
+ String retValue = FileUtils.fileRead( file );
+
+ return retValue;
}
finally
{
diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEvent.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEvent.java
index 12f6482..65e35a5 100644
--- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEvent.java
+++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/SessionEvent.java
@@ -145,14 +145,23 @@
{
switch ( eventType )
{
+
case SessionEvent.SESSION_CLOSED:
+ break;
case SessionEvent.SESSION_DISCONNECTED:
+ break;
case SessionEvent.SESSION_DISCONNECTING:
+ break;
case SessionEvent.SESSION_ERROR_OCCURRED:
+ break;
case SessionEvent.SESSION_LOGGED_IN:
+ break;
case SessionEvent.SESSION_LOGGED_OFF:
+ break;
case SessionEvent.SESSION_OPENED:
+ break;
case SessionEvent.SESSION_OPENING:
+ break;
case SessionEvent.SESSION_CONNECTION_REFUSED:
break;
default :
diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEvent.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEvent.java
index 1f60b66..8bddcaa 100644
--- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEvent.java
+++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/events/TransferEvent.java
@@ -140,6 +140,7 @@
{
case REQUEST_PUT:
+ break;
case REQUEST_GET:
break;
@@ -167,9 +168,13 @@
{
case TRANSFER_INITIATED:
+ break;
case TRANSFER_STARTED:
+ break;
case TRANSFER_COMPLETED:
+ break;
case TRANSFER_PROGRESS:
+ break;
case TRANSFER_ERROR:
break;
default :
diff --git a/wagon-provider-api/src/test/java/org/apache/maven/wagon/AbstractWagonTest.java b/wagon-provider-api/src/test/java/org/apache/maven/wagon/AbstractWagonTest.java
index 37e0e17..7f2fe49 100644
--- a/wagon-provider-api/src/test/java/org/apache/maven/wagon/AbstractWagonTest.java
+++ b/wagon-provider-api/src/test/java/org/apache/maven/wagon/AbstractWagonTest.java
@@ -19,7 +19,14 @@
* under the License.
*/
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
import junit.framework.TestCase;
+
import org.apache.maven.wagon.authentication.AuthenticationException;
import org.apache.maven.wagon.authentication.AuthenticationInfo;
import org.apache.maven.wagon.authorization.AuthorizationException;
@@ -36,12 +43,6 @@
import org.easymock.AbstractMatcher;
import org.easymock.MockControl;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id: AbstractWagonTest.java 630808 2008-02-25 11:01:41Z brett $
@@ -77,7 +78,7 @@
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
{
}
- }
+ };
private String basedir;
diff --git a/wagon-provider-test/pom.xml b/wagon-provider-test/pom.xml
index f5f6d39..c89fc6a 100644
--- a/wagon-provider-test/pom.xml
+++ b/wagon-provider-test/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -48,12 +48,12 @@
<dependency>
<groupId>easymock</groupId>
<artifactId>easymock</artifactId>
- <scope>compile</scope>
+ <version>1.2_Java1.3</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
+ <version>6.1.11</version>
</dependency>
-
</dependencies>
</project>
diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/FileTestUtils.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/FileTestUtils.java
index df81dff..73b5c99 100644
--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/FileTestUtils.java
+++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/FileTestUtils.java
@@ -19,13 +19,13 @@
* under the License.
*/
-import org.codehaus.plexus.util.FileUtils;
-
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
+import org.codehaus.plexus.util.FileUtils;
+
/**
* @author <a href="michal@apache.org>Michal Maczka</a>
* @version $Id$
@@ -107,14 +107,9 @@
Writer writer = new FileWriter( f );
- try
- {
- writer.write( content );
- }
- finally
- {
- writer.close();
- }
+ writer.write( content );
+
+ writer.close();
return f;
}
diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/StreamingWagonTestCase.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/StreamingWagonTestCase.java
index 8368158..3366cb2 100644
--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/StreamingWagonTestCase.java
+++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/StreamingWagonTestCase.java
@@ -22,10 +22,14 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
+import org.apache.maven.wagon.authentication.AuthenticationException;
+import org.apache.maven.wagon.authorization.AuthorizationException;
import org.apache.maven.wagon.observers.ChecksumObserver;
import org.apache.maven.wagon.resource.Resource;
import org.codehaus.plexus.util.FileUtils;
@@ -134,7 +138,8 @@
}
private void getIfNewerToStream( long timestamp, boolean expectedResult, int expectedSize )
- throws Exception
+ throws Exception, NoSuchAlgorithmException, IOException, ConnectionException, AuthenticationException,
+ TransferFailedException, ResourceDoesNotExistException, AuthorizationException
{
StreamingWagon wagon = (StreamingWagon) getWagon();
@@ -252,10 +257,6 @@
stream = new FileInputStream( sourceFile );
wagon.putFromStream( stream, resource, sourceFile.length(), sourceFile.lastModified() );
}
- catch( Exception e )
- {
- logger.error( "error while putting resources to the FTP Server", e );
- }
finally
{
IOUtil.close( stream );
@@ -288,10 +289,6 @@
stream = new FileOutputStream( destFile );
wagon.getToStream( this.resource, stream );
}
- catch( Exception e )
- {
- logger.error( "error while reading resources from the FTP Server", e );
- }
finally
{
IOUtil.close( stream );
diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java
index cab1919..3ece573 100644
--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java
+++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java
@@ -24,10 +24,10 @@
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.log4j.Logger;
import org.apache.maven.wagon.authentication.AuthenticationException;
import org.apache.maven.wagon.authentication.AuthenticationInfo;
import org.apache.maven.wagon.authorization.AuthorizationException;
@@ -50,9 +50,6 @@
public abstract class WagonTestCase
extends PlexusTestCase
{
- protected static Logger logger = Logger.getLogger( WagonTestCase.class );
-
-
static final class ProgressArgumentMatcher
extends AbstractMatcher
{
@@ -135,13 +132,6 @@
*/
protected abstract String getProtocol();
- /**
- * The number of the port which should get used to start the test server
- *
- * @return the port number for the test server
- */
- protected abstract int getTestRepositoryPort();
-
// ----------------------------------------------------------------------
// 1. Create a local file repository which mimic a users local file
// Repository.
@@ -230,7 +220,7 @@
protected void message( String message )
{
- logger.info( message );
+ System.out.println( message );
}
// ----------------------------------------------------------------------
@@ -292,7 +282,8 @@
}
private void getIfNewer( long timestamp, boolean expectedResult, int expectedSize )
- throws Exception
+ throws Exception, NoSuchAlgorithmException, IOException, ConnectionException, AuthenticationException,
+ TransferFailedException, ResourceDoesNotExistException, AuthorizationException
{
Wagon wagon = getWagon();
@@ -989,9 +980,8 @@
resource = new Resource( this.resource );
resource.setContentLength( getExpectedContentLengthOnGet( expectedSize ) );
resource.setLastModified( getExpectedLastModifiedOnGet( testRepository, resource ) );
- TransferEvent te = createTransferEvent( wagon, resource, TransferEvent.TRANSFER_STARTED,
- TransferEvent.REQUEST_GET, null );
- mockTransferListener.transferStarted( te );
+ mockTransferListener.transferStarted( createTransferEvent( wagon, resource, TransferEvent.TRANSFER_STARTED,
+ TransferEvent.REQUEST_GET, destFile ) );
mockTransferListener.transferProgress( new TransferEvent( wagon, resource, TransferEvent.TRANSFER_PROGRESS,
TransferEvent.REQUEST_GET ), new byte[] {}, 0 );
ProgressArgumentMatcher progressArgumentMatcher = new ProgressArgumentMatcher();
diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
index dc37704..e04fdc2 100644
--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
+++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
@@ -19,12 +19,30 @@
* under the License.
*/
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLDecoder;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.zip.GZIPOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.FileTestUtils;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.StreamingWagon;
import org.apache.maven.wagon.StreamingWagonTestCase;
import org.apache.maven.wagon.TransferFailedException;
import org.apache.maven.wagon.Wagon;
+import org.apache.maven.wagon.authentication.AuthenticationException;
import org.apache.maven.wagon.authentication.AuthenticationInfo;
import org.apache.maven.wagon.authorization.AuthorizationException;
import org.apache.maven.wagon.proxy.ProxyInfo;
@@ -47,21 +65,6 @@
import org.mortbay.jetty.servlet.DefaultServlet;
import org.mortbay.jetty.servlet.ServletHolder;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.URLDecoder;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.zip.GZIPOutputStream;
-
/**
* @version $Id: LightweightHttpWagonTest.java 680764 2008-07-29 16:45:51Z brett $
*/
@@ -85,7 +88,7 @@
FileUtils.deleteDirectory( repositoryDirectory );
repositoryDirectory.mkdirs();
- server = new Server( getTestRepositoryPort() );
+ server = new Server( 10007 );
PutHandler putHandler = new PutHandler( repositoryDirectory );
server.addHandler( putHandler );
@@ -206,7 +209,8 @@
}
private void runTestGet( int status )
- throws Exception
+ throws Exception, ConnectionException, AuthenticationException, TransferFailedException,
+ ResourceDoesNotExistException, AuthorizationException
{
StreamingWagon wagon = (StreamingWagon) getWagon();
@@ -274,7 +278,8 @@
}
private boolean runTestResourceExists( int status )
- throws Exception
+ throws Exception, ConnectionException, AuthenticationException, TransferFailedException,
+ ResourceDoesNotExistException, AuthorizationException
{
StreamingWagon wagon = (StreamingWagon) getWagon();
@@ -313,7 +318,7 @@
public void testGzipGet()
throws Exception
{
- Server server = new Server( getTestRepositoryPort() );
+ Server server = new Server( 10008 );
String localRepositoryPath = FileTestUtils.getTestOutputDir().toString();
Context root = new Context( server, "/", Context.SESSIONS );
@@ -380,14 +385,15 @@
}
private void runTestProxiedRequest( ProxyInfo proxyInfo, TestHeaderHandler handler )
- throws Exception
+ throws Exception, IOException, ConnectionException, AuthenticationException, ResourceDoesNotExistException,
+ TransferFailedException, AuthorizationException
{
- Server proxyServer = new Server( getTestRepositoryPort() );
+ Server proxyServer = new Server( 10007 );
proxyServer.setHandler( handler );
proxyServer.start();
- proxyInfo.setPort( getTestRepositoryPort() );
+ proxyInfo.setPort( 10007 );
try
{
@@ -623,32 +629,18 @@
file.getParentFile().mkdirs();
file.deleteOnExit();
OutputStream out = new FileOutputStream( file );
- try
- {
- out.write( child.getBytes() );
- }
- finally
- {
- out.close();
- }
+ out.write( child.getBytes() );
+ out.close();
file = new File( parent, child + ".gz" );
file.deleteOnExit();
- String content;
out = new FileOutputStream( file );
out = new GZIPOutputStream( out );
- try
- {
// write out different data than non-gz file, so we can
// assert the gz version was returned
- content = file.getAbsolutePath();
+ String content = file.getAbsolutePath();
out.write( content.getBytes() );
- }
- finally
- {
- out.close();
- }
-
+ out.close();
return content;
}
@@ -695,7 +687,8 @@
}
private void runTestPut( int status )
- throws Exception
+ throws Exception, ConnectionException, AuthenticationException, TransferFailedException,
+ ResourceDoesNotExistException, AuthorizationException
{
StreamingWagon wagon = (StreamingWagon) getWagon();
diff --git a/wagon-providers/pom.xml b/wagon-providers/pom.xml
index 83602af..c0bf971 100644
--- a/wagon-providers/pom.xml
+++ b/wagon-providers/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -37,7 +37,6 @@
<module>wagon-http-lightweight</module>
<module>wagon-http</module>
<module>wagon-http-shared</module>
- <module>wagon-http-shared4</module>
<module>wagon-scm</module>
<module>wagon-ssh-external</module>
<module>wagon-ssh-common</module>
diff --git a/wagon-providers/wagon-file/pom.xml b/wagon-providers/wagon-file/pom.xml
index e1113a3..75e436c 100644
--- a/wagon-providers/wagon-file/pom.xml
+++ b/wagon-providers/wagon-file/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java b/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java
index 4953421..ebe0639 100644
--- a/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java
+++ b/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java
@@ -19,6 +19,9 @@
* under the License.
*/
+import java.io.File;
+import java.io.IOException;
+
import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.FileTestUtils;
import org.apache.maven.wagon.StreamingWagonTestCase;
@@ -27,9 +30,6 @@
import org.apache.maven.wagon.repository.Repository;
import org.apache.maven.wagon.resource.Resource;
-import java.io.File;
-import java.io.IOException;
-
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id$
@@ -49,13 +49,7 @@
return "file://" + file.getPath();
}
-
- @Override
- protected int getTestRepositoryPort() {
- // file transfer dont needs a port
- return 0;
- }
-
+
/**
* This test is introduced to allow for null file wagons.
* Which is used heavily in the maven component ITs.
diff --git a/wagon-providers/wagon-ftp/pom.xml b/wagon-providers/wagon-ftp/pom.xml
index 28dae0a..ddd0dc0 100644
--- a/wagon-providers/wagon-ftp/pom.xml
+++ b/wagon-providers/wagon-ftp/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -37,22 +37,19 @@
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
- <version>3.0</version>
+ <version>2.0</version>
</dependency>
-
<dependency>
- <groupId>org.apache.ftpserver</groupId>
- <artifactId>ftpserver-core</artifactId>
- <version>1.0.5</version>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-ftpd</artifactId>
+ <version>1.0-alpha-1</version>
<scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
<build>
@@ -60,6 +57,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0.1</version>
<executions>
<execution>
<goals>
diff --git a/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java b/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
index 09c6c02..a1d05df 100644
--- a/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
+++ b/wagon-providers/wagon-ftp/src/main/java/org/apache/maven/wagon/providers/ftp/FtpWagon.java
@@ -19,6 +19,15 @@
* under the License.
*/
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+
import org.apache.commons.net.ProtocolCommandEvent;
import org.apache.commons.net.ProtocolCommandListener;
import org.apache.commons.net.ftp.FTP;
@@ -40,16 +49,6 @@
import org.apache.maven.wagon.resource.Resource;
import org.codehaus.plexus.util.IOUtil;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-
/**
* FtpWagon
*
@@ -473,10 +472,8 @@
String filename = PathUtils.filename( resource.getName() );
int status = ftp.stat( filename );
- return ( ( status == FTPReply.FILE_STATUS ) || ( status == FTPReply.DIRECTORY_STATUS )
- || ( status == FTPReply.FILE_STATUS_OK ) // not in the RFC but used by some FTP servers
- || ( status == FTPReply.COMMAND_OK ) // not in the RFC but used by some FTP servers
- || ( status == FTPReply.SYSTEM_STATUS ) );
+ return ( ( status == FTPReply.FILE_STATUS ) || ( status == FTPReply.FILE_STATUS_OK )
+ || ( status == FTPReply.SYSTEM_STATUS ) );
}
catch ( IOException e )
{
@@ -502,19 +499,8 @@
{
if ( !ftp.changeWorkingDirectory( getRepository().getBasedir() ) )
{
- RepositoryPermissions permissions = getRepository().getPermissions();
- if ( !makeFtpDirectoryRecursive( getRepository().getBasedir() , permissions ) )
- {
- throw new TransferFailedException( "Required directory: '" + getRepository().getBasedir() + "' "
- + "could not get created" );
- }
-
- // try it again sam ...
- if ( !ftp.changeWorkingDirectory( getRepository().getBasedir() ) )
- {
- throw new TransferFailedException( "Required directory: '" + getRepository().getBasedir() + "' "
- + "is missing and could not get created" );
- }
+ throw new TransferFailedException( "Required directory: '" + getRepository().getBasedir() + "' "
+ + "is missing" );
}
}
catch ( IOException e )
@@ -543,8 +529,36 @@
if ( !ftp.changeWorkingDirectory( fileName ) )
{
// first, try to create it
- if ( makeFtpDirectoryRecursive( fileName, permissions ) )
+ if ( ftp.makeDirectory( fileName ) )
{
+ if ( permissions != null )
+ {
+ // Process permissions; note that if we get errors or exceptions here, they are ignored.
+ // This appears to be a conscious decision, based on other parts of this code.
+ String group = permissions.getGroup();
+ if ( group != null )
+ {
+ try
+ {
+ ftp.sendSiteCommand( "CHGRP " + permissions.getGroup() );
+ }
+ catch ( IOException e )
+ {
+ }
+ }
+ String mode = permissions.getDirectoryMode();
+ if ( mode != null )
+ {
+ try
+ {
+ ftp.sendSiteCommand( "CHMOD " + permissions.getDirectoryMode() );
+ }
+ catch ( IOException e )
+ {
+ }
+ }
+ }
+
if ( !ftp.changeWorkingDirectory( fileName ) )
{
throw new TransferFailedException( "Unable to change cwd on ftp server to " + fileName
@@ -655,119 +669,6 @@
}
- fireTransferDebug("completed = " + sourceFile.getAbsolutePath());
- }
-
- /**
- * Set the permissions (if given) for the underlying folder.
- * Note: Since the FTP SITE command might be server dependent, we cannot
- * rely on the functionality available on each FTP server!
- * So we can only try and hope it works (and catch away all Exceptions).
- *
- * @param permissions group and directory permissions
- */
- private void setPermissions(RepositoryPermissions permissions) {
- if ( permissions != null )
- {
- // Process permissions; note that if we get errors or exceptions here, they are ignored.
- // This appears to be a conscious decision, based on other parts of this code.
- String group = permissions.getGroup();
- if ( group != null )
- {
- try
- {
- ftp.sendSiteCommand( "CHGRP " + permissions.getGroup() );
- }
- catch ( IOException e )
- {
- }
- }
- String mode = permissions.getDirectoryMode();
- if ( mode != null )
- {
- try
- {
- ftp.sendSiteCommand( "CHMOD " + permissions.getDirectoryMode() );
- }
- catch ( IOException e )
- {
- }
- }
- }
- }
-
- /**
- * Recursively create directories.
- *
- * @param fileName the path to create (might be nested)
- * @param permissions
- * @return ok
- * @throws IOException
- */
- private boolean makeFtpDirectoryRecursive(String fileName, RepositoryPermissions permissions) throws IOException
- {
- if ( fileName == null || fileName.length() == 0 ||
- fileName.replace('/', '_').trim().length() == 0 ) // if a string is '/', '//' or similar
- {
- return false;
- }
-
- int slashPos = fileName.indexOf( "/" );
- String oldPwd = null;
- boolean ok = true;
-
- if ( slashPos == 0 )
- {
- // this is an absolute directory
- oldPwd = ftp.printWorkingDirectory();
-
- // start with the root
- ftp.changeWorkingDirectory( "/" );
- fileName = fileName.substring( 1 );
-
- // look up the next path separator
- slashPos = fileName.indexOf( "/" );
- }
-
- if ( slashPos >= 0 &&
- slashPos < ( fileName.length() - 1 ) ) // not only a slash at the end, like in 'newDir/'
- {
- if ( oldPwd == null)
- {
- oldPwd = ftp.printWorkingDirectory();
- }
-
- String nextDir = fileName.substring( 0, slashPos );
-
- // we only create the nextDir if it doesn't yet exist
- if ( !ftp.changeWorkingDirectory( nextDir ) )
- {
- ok &= ftp.makeDirectory( nextDir );
- }
-
- if ( ok )
- {
- // set the permissions for the freshly created directory
- setPermissions( permissions );
-
- ftp.changeWorkingDirectory( nextDir );
-
- // now create the deeper directories
- String remainingDirs = fileName.substring( slashPos + 1 );
- ok &= makeFtpDirectoryRecursive( remainingDirs, permissions);
- }
- }
- else
- {
- ok = ftp.makeDirectory( fileName );
- }
-
- if ( oldPwd != null )
- {
- // change back to the old working directory
- ftp.changeWorkingDirectory( oldPwd );
- }
-
- return ok;
+ fireTransferDebug( "completed = " + sourceFile.getAbsolutePath() );
}
}
diff --git a/wagon-providers/wagon-ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java b/wagon-providers/wagon-ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java
index 818c0ca..e064679 100644
--- a/wagon-providers/wagon-ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java
+++ b/wagon-providers/wagon-ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java
@@ -19,14 +19,9 @@
* under the License.
*/
-import org.apache.ftpserver.FtpServer;
-import org.apache.ftpserver.FtpServerFactory;
-import org.apache.ftpserver.ftplet.Authority;
-import org.apache.ftpserver.ftplet.UserManager;
-import org.apache.ftpserver.listener.ListenerFactory;
-import org.apache.ftpserver.usermanager.PropertiesUserManagerFactory;
-import org.apache.ftpserver.usermanager.impl.BaseUser;
-import org.apache.ftpserver.usermanager.impl.WritePermission;
+import java.io.File;
+
+import org.apache.ftpserver.interfaces.FtpServerInterface;
import org.apache.maven.wagon.FileTestUtils;
import org.apache.maven.wagon.StreamingWagonTestCase;
import org.apache.maven.wagon.Wagon;
@@ -36,10 +31,6 @@
import org.apache.maven.wagon.resource.Resource;
import org.codehaus.plexus.util.FileUtils;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id$
@@ -47,63 +38,17 @@
public class FtpWagonTest
extends StreamingWagonTestCase
{
- static private FtpServer server;
+ private FtpServerInterface server;
protected String getProtocol()
{
return "ftp";
}
- @Override
- protected int getTestRepositoryPort() {
- return 10023;
- }
-
protected void setupWagonTestingFixtures()
throws Exception
{
- File ftpHomeDir = getRepositoryDirectory();
- if ( !ftpHomeDir.exists() )
- {
- ftpHomeDir.mkdirs();
- }
-
- if (server == null)
- {
- FtpServerFactory serverFactory = new FtpServerFactory();
-
- ListenerFactory factory = new ListenerFactory();
-
- // set the port of the listener
- factory.setPort(getTestRepositoryPort());
-
- // replace the default listener
- serverFactory.addListener("default", factory.createListener());
-
- PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
- UserManager um = userManagerFactory.createUserManager();
-
- BaseUser user = new BaseUser();
- user.setName("admin");
- user.setPassword("admin");
-
- List<Authority> authorities = new ArrayList<Authority>();
- authorities.add( new WritePermission() );
-
- user.setAuthorities( authorities );
-
- user.setHomeDirectory( ftpHomeDir.getAbsolutePath() );
-
-
- um.save(user);
-
- serverFactory.setUserManager( um );
-
- server = serverFactory.createServer();
-
- // start the server
- server.start();
- }
+ server = (FtpServerInterface) lookup( FtpServerInterface.ROLE );
}
protected void createDirectory( Wagon wagon, String resourceToCreate, String dirName )
@@ -117,13 +62,12 @@
protected void tearDownWagonTestingFixtures()
throws Exception
{
- server.stop();
- server = null;
+ release( server );
}
protected String getTestRepositoryUrl()
{
- return "ftp://localhost:" + getTestRepositoryPort();
+ return "ftp://localhost:10023";
}
public AuthenticationInfo getAuthInfo()
@@ -181,55 +125,4 @@
assertEquals( System.getProperty( "user.name" ), authenticationInfo.getUserName() );
}
}
-
- /**
- * This is a unit test to show WAGON-265
- */
- public void testPutDirectoryCreation()
- throws Exception
- {
- setupRepositories();
-
- setupWagonTestingFixtures();
-
- Wagon wagon = getWagon();
-
- if ( wagon.supportsDirectoryCopy() )
- {
- // do the cleanup first
- File destDir = new File( getRepositoryDirectory(), "dirExists" );
- FileUtils.deleteDirectory(destDir);
- destDir.mkdirs();
- destDir = new File( destDir, "not_yet_existing/also_not" );
-
- File sourceDir = new File( getRepositoryDirectory(), "testDirectory" );
-
- FileUtils.deleteDirectory(sourceDir);
- sourceDir.mkdir();
-
- File testRes = new File( sourceDir, "test-resource-1.txt" );
- testRes.createNewFile();
-
- // This is the difference to our normal use case:
- // the directory specified in the repo string doesn't yet exist!
-
- testRepository.setUrl( testRepository.getUrl() + "/dirExists/not_yet_existing/also_not" );
-
- wagon.connect( testRepository, getAuthInfo() );
-
- wagon.putDirectory( sourceDir, "testDirectory" );
-
- destFile = FileTestUtils.createUniqueFile(getName(), getName());
-
- destFile.deleteOnExit();
-
- wagon.get( "testDirectory/test-resource-1.txt", destFile );
-
- wagon.disconnect();
- }
-
- tearDownWagonTestingFixtures();
-
-
- }
}
diff --git a/wagon-providers/wagon-ftp/src/test/resources/org/apache/maven/wagon/providers/ftp/FtpWagonTest.xml b/wagon-providers/wagon-ftp/src/test/resources/org/apache/maven/wagon/providers/ftp/FtpWagonTest.xml
index 8a47664..edb5144 100644
--- a/wagon-providers/wagon-ftp/src/test/resources/org/apache/maven/wagon/providers/ftp/FtpWagonTest.xml
+++ b/wagon-providers/wagon-ftp/src/test/resources/org/apache/maven/wagon/providers/ftp/FtpWagonTest.xml
@@ -18,4 +18,121 @@
-->
<plexus>
+ <lifecycle-handler-manager implementation="org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager">
+ <default-lifecycle-handler-id>avalon</default-lifecycle-handler-id>
+ <lifecycle-handlers>
+ <lifecycle-handler implementation="org.codehaus.plexus.personality.avalon.AvalonLifecycleHandler">
+ <id>avalon</id>
+ <name>Avalon Lifecycle Handler</name>
+ <begin-segment>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.LogEnablePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.ContextualizePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.ServicePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.ComposePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.ConfigurePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.InitializePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.StartPhase"/>
+ </begin-segment>
+ <suspend-segment>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.SuspendPhase"/>
+ </suspend-segment>
+ <resume-segment>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.ResumePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.RecontextualizePhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.ReconfigurePhase"/>
+ </resume-segment>
+ <end-segment>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.StopPhase"/>
+ <phase implementation="org.codehaus.plexus.personality.avalon.lifecycle.phase.DisposePhase"/>
+ </end-segment>
+ </lifecycle-handler>
+ </lifecycle-handlers>
+ </lifecycle-handler-manager>
+
+ <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>
+ <role>org.apache.ftpserver.usermanager.UserManagerInterface</role>
+ <implementation>org.apache.ftpserver.usermanager.PropertiesUserManager</implementation>
+ <configuration>
+ <base-directory>${basedir}/target/test-output/</base-directory>
+ </configuration>
+ </component>
+ <component>
+ <role>org.apache.ftpserver.ip.IpRestrictorInterface</role>
+ <implementation>org.apache.ftpserver.ip.FileIpRestrictor</implementation>
+ <configuration>
+ <base-directory>${basedir}/target/test-output/local-repository</base-directory>
+ </configuration>
+ </component>
+ <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>
+ </requirement>
+ <requirement>
+ <role>org.apache.avalon.cornerstone.services.connection.ConnectionManager</role>
+ </requirement>
+ <requirement>
+ <role>org.apache.ftpserver.ip.IpRestrictorInterface</role>
+ </requirement>
+ <requirement>
+ <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>10023</ftp-port>
+ <default-user-root>${basedir}/target/test-output/local-repository</default-user-root>
+ </configuration>
+ </component>
+ </components>
</plexus>
diff --git a/wagon-providers/wagon-http-lightweight/pom.xml b/wagon-providers/wagon-http-lightweight/pom.xml
index 3d42d27..70ea885 100644
--- a/wagon-providers/wagon-http-lightweight/pom.xml
+++ b/wagon-providers/wagon-http-lightweight/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -36,12 +36,12 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>wagon-http-shared4</artifactId>
+ <artifactId>wagon-http-shared</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
@@ -49,13 +49,5 @@
</exclusion>
</exclusions>
</dependency>
-
- <!-- used fo the TCK -->
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-tck-http</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java b/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
index 0cb284a..c329a5f 100644
--- a/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
+++ b/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
@@ -19,6 +19,21 @@
* under the License.
*/
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Authenticator;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.zip.GZIPInputStream;
+
import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.InputData;
import org.apache.maven.wagon.OutputData;
@@ -32,22 +47,6 @@
import org.apache.maven.wagon.resource.Resource;
import org.apache.maven.wagon.shared.http.HtmlFileListParser;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Authenticator;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.PasswordAuthentication;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.zip.GZIPInputStream;
-
/**
* LightweightHttpWagon
*
@@ -66,8 +65,6 @@
private HttpURLConnection putConnection;
- public static final int MAX_REDIRECTS = 10;
-
/**
* Whether to use any proxy cache or not.
*
@@ -104,53 +101,34 @@
Resource resource = inputData.getResource();
try
{
- List<String> visitedUrls = new ArrayList<String>();
- String visitingUrl = buildUrl( resource.getName() );
-
- for ( int redirectCount = 0; redirectCount < MAX_REDIRECTS; redirectCount++ )
+ URL url = new URL( buildUrl( resource.getName() ) );
+ HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setRequestProperty( "Accept-Encoding", "gzip" );
+ if ( !useCache )
{
- if ( visitedUrls.contains( visitingUrl ) )
- {
- throw new TransferFailedException( "Cyclic http redirect detected. Aborting! " + visitingUrl );
- }
- visitedUrls.add( visitingUrl );
-
- URL url = new URL( visitingUrl );
- HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
- urlConnection.setRequestProperty( "Accept-Encoding", "gzip" );
- if ( !useCache )
- {
- urlConnection.setRequestProperty( "Pragma", "no-cache" );
- }
-
- addHeaders( urlConnection );
-
- // TODO: handle all response codes
- int responseCode = urlConnection.getResponseCode();
- if ( responseCode == HttpURLConnection.HTTP_FORBIDDEN
- || responseCode == HttpURLConnection.HTTP_UNAUTHORIZED )
- {
- throw new AuthorizationException( "Access denied to: " + buildUrl( resource.getName() ) );
- }
- if ( responseCode == HttpURLConnection.HTTP_MOVED_PERM
- || responseCode == HttpURLConnection.HTTP_MOVED_TEMP )
- {
- visitingUrl = urlConnection.getHeaderField( "Location" );
- continue;
- }
-
- InputStream is = urlConnection.getInputStream();
- String contentEncoding = urlConnection.getHeaderField( "Content-Encoding" );
- boolean isGZipped = contentEncoding != null && "gzip".equalsIgnoreCase( contentEncoding );
- if ( isGZipped )
- {
- is = new GZIPInputStream( is );
- }
- inputData.setInputStream( is );
- resource.setLastModified( urlConnection.getLastModified() );
- resource.setContentLength( urlConnection.getContentLength() );
- break;
+ urlConnection.setRequestProperty( "Pragma", "no-cache" );
}
+
+ addHeaders( urlConnection );
+
+ // TODO: handle all response codes
+ int responseCode = urlConnection.getResponseCode();
+ if ( responseCode == HttpURLConnection.HTTP_FORBIDDEN
+ || responseCode == HttpURLConnection.HTTP_UNAUTHORIZED )
+ {
+ throw new AuthorizationException( "Access denied to: " + buildUrl( resource.getName() ) );
+ }
+
+ InputStream is = urlConnection.getInputStream();
+ String contentEncoding = urlConnection.getHeaderField( "Content-Encoding" );
+ boolean isGZipped = contentEncoding == null ? false : "gzip".equalsIgnoreCase( contentEncoding );
+ if ( isGZipped )
+ {
+ is = new GZIPInputStream( is );
+ }
+ inputData.setInputStream( is );
+ resource.setLastModified( urlConnection.getLastModified() );
+ resource.setContentLength( urlConnection.getContentLength() );
}
catch ( MalformedURLException e )
{
diff --git a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
index f5869d1..d5911a9 100644
--- a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
+++ b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
@@ -19,15 +19,13 @@
* under the License.
*/
+import java.util.Properties;
+
import org.apache.maven.wagon.StreamingWagon;
import org.apache.maven.wagon.Wagon;
import org.apache.maven.wagon.http.HttpWagonTestCase;
import org.apache.maven.wagon.proxy.ProxyInfo;
import org.apache.maven.wagon.repository.Repository;
-import org.codehaus.plexus.util.FileUtils;
-
-import java.io.File;
-import java.util.Properties;
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
@@ -43,12 +41,7 @@
protected String getTestRepositoryUrl()
{
- return getProtocol() + "://localhost:" + getTestRepositoryPort() + "/";
- }
-
- @Override
- protected int getTestRepositoryPort() {
- return 10017;
+ return getProtocol() + "://localhost:10007/";
}
protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
@@ -143,41 +136,4 @@
System.getProperties().remove( "http.nonProxyHosts" );
}
}
-
- /**
- * This unit test will verify the behaviour of WAGON-314.
- * Handling a HTTP redirect (301) properly
- *
- * It is disabled by default because it needs an online connection to maven.central
- */
- public void disabledtestHttpRedirect() throws Exception
- {
- Repository repository = new Repository( "apache.releases",
- "http://repository.apache.org/service/local/repositories/releases/content/" );
-
- Wagon wagon = getWagon();
-
- wagon.connect( repository );
-
- File destinationDir = new File( "./target/" );
- assertTrue( destinationDir.exists() );
-
- File downloadedFile = new File( destinationDir, "downloadedFile.pom" );
-
- if ( downloadedFile.exists() )
- {
- downloadedFile.delete();
- assertFalse( downloadedFile.exists() );
- }
-
- wagon.get( "org/apache/maven/maven-parent/19/maven-parent-19.pom", downloadedFile );
-
- assertTrue( downloadedFile.exists() );
-
- String artifactContent = FileUtils.fileRead( downloadedFile, "UTF-8" );
- assertNotNull( artifactContent );
- assertTrue( artifactContent.contains( "<artifactId>maven-parent</artifactId>" ) );
-
- wagon.disconnect();
- }
}
diff --git a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/TckTest.java b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/TckTest.java
deleted file mode 100644
index 4be6dde..0000000
--- a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/TckTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.maven.wagon.providers.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.wagon.tck.http.GetWagonTests;
-import org.apache.maven.wagon.tck.http.HttpWagonTests;
-import org.apache.maven.wagon.tck.http.HttpsGetWagonTests;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * This test will runn the TCK suite on wagon-http-lightweight
- */
-@RunWith( Suite.class )
-@Suite.SuiteClasses( { GetWagonTests.class, HttpsGetWagonTests.class } )
-public class TckTest {
-
- @BeforeClass
- public static void setup()
- {
- HttpWagonTests.setDefaultPort(9082);
- }
-}
diff --git a/wagon-providers/wagon-http-lightweight/src/test/resources/META-INF/plexus/components.xml b/wagon-providers/wagon-http-lightweight/src/test/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 8c4cc2f..0000000
--- a/wagon-providers/wagon-http-lightweight/src/test/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<component-set>
- <components>
- <component>
- <role>org.apache.maven.wagon.tck.http.WagonTestCaseConfigurator</role>
- <implementation>org.apache.maven.wagon.tck.http.WagonTestCaseConfigurator</implementation>
- <configuration>
- <wagonHint>http</wagonHint>
- <useCaseConfigs>
- <highLatencyLowTimeout>
- <unsupported/>
- </highLatencyLowTimeout>
- <inifiniteLatencyTimeout>
- <unsupported/>
- </inifiniteLatencyTimeout>
- </useCaseConfigs>
- </configuration>
- </component>
- </components>
-</component-set>
diff --git a/wagon-providers/wagon-http-shared/pom.xml b/wagon-providers/wagon-http-shared/pom.xml
index 205f8b3..016201c 100644
--- a/wagon-providers/wagon-http-shared/pom.xml
+++ b/wagon-providers/wagon-http-shared/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -36,22 +36,6 @@
<dependencies>
<dependency>
- <groupId>nekohtml</groupId>
- <artifactId>xercesMinimal</artifactId>
- <version>1.9.6.2</version>
- </dependency>
- <dependency>
- <groupId>nekohtml</groupId>
- <artifactId>nekohtml</artifactId>
- <version>1.9.6.2</version>
- <exclusions>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
@@ -75,5 +59,15 @@
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jsoup</groupId>
+ <artifactId>jsoup</artifactId>
+ <version>1.6.1</version>
+ </dependency>
</dependencies>
</project>
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
index e3a2a6b..18b08ff 100644
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
@@ -19,33 +19,18 @@
* under the License.
*/
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URLEncoder;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Properties;
-import java.util.TimeZone;
-import java.util.zip.GZIPInputStream;
-
import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpConnectionManager;
+import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.NTCredentials;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.cookie.CookiePolicy;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.HeadMethod;
import org.apache.commons.httpclient.methods.PutMethod;
@@ -68,6 +53,21 @@
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Properties;
+import java.util.TimeZone;
+import java.util.zip.GZIPInputStream;
+
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
* @author <a href="mailto:james@atlassian.com">James William Dumay</a>
@@ -195,10 +195,6 @@
{
repository.setUrl( getURL( repository ) );
client = new HttpClient( connectionManager );
-
- // WAGON-273: default the cookie-policy to browser compatible
- client.getParams().setCookiePolicy( CookiePolicy.BROWSER_COMPATIBILITY );
-
String username = null;
String password = null;
@@ -385,9 +381,8 @@
}
}
- protected void mkdirs( String dirname ) throws IOException
+ protected void mkdirs( String dirname ) throws HttpException, IOException
{
- // do nothing as default.
}
public boolean resourceExists( String resourceName )
@@ -441,9 +436,9 @@
}
}
- protected int execute( HttpMethod httpMethod ) throws IOException
+ protected int execute( HttpMethod httpMethod ) throws HttpException, IOException
{
- int statusCode;
+ int statusCode = SC_NULL;
setParameters( httpMethod );
setHeaders( httpMethod );
@@ -659,7 +654,8 @@
}
Header contentEncoding = getMethod.getResponseHeader( "Content-Encoding" );
- boolean isGZipped = contentEncoding != null && "gzip".equalsIgnoreCase( contentEncoding.getValue() );
+ boolean isGZipped =
+ contentEncoding == null ? false : "gzip".equalsIgnoreCase( contentEncoding.getValue() );
try
{
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
index 3a96724..446a9dd 100644
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
@@ -31,21 +31,34 @@
import java.util.Set;
import java.util.regex.Pattern;
+import org.apache.commons.io.IOUtils;
import org.apache.maven.wagon.TransferFailedException;
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
import org.codehaus.plexus.util.StringUtils;
-import org.cyberneko.html.HTMLConfiguration;
-import org.cyberneko.html.filters.DefaultFilter;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
/**
* Html File List Parser.
*/
public class HtmlFileListParser
{
+ // Apache Fancy Index Sort Headers
+ private static final Pattern APACHE_INDEX_SKIP = Pattern.compile( "\\?[CDMNS]=.*" );
+
+ // URLs with excessive paths.
+ private static final Pattern URLS_WITH_PATHS = Pattern.compile( "/[^/]*/" );
+
+ // URLs that to a parent directory.
+ private static final Pattern URLS_TO_PARENT = Pattern.compile( "\\.\\./" );
+
+ // mailto urls
+ private static final Pattern MAILTO_URLS = Pattern.compile( "mailto:.*" );
+
+ private static final Pattern[] SKIPS = new Pattern[] { APACHE_INDEX_SKIP, URLS_WITH_PATHS, URLS_TO_PARENT,
+ MAILTO_URLS };
+
/**
* Fetches a raw HTML from a provided InputStream, parses it, and returns the file list.
*
@@ -58,126 +71,96 @@
{
try
{
- // Use URI object to get benefits of proper absolute and relative path resolution for free
URI baseURI = new URI( baseurl );
+ // to make debugging easier, start with a string. This is assuming UTF-8, which might not be a safe
+ // assumption.
+ String content = IOUtils.toString( stream, "utf-8" );
+ Document doc = Jsoup.parse( content, baseurl );
+ Elements links = doc.getElementsByTag( "a" );
+ Set results = new HashSet();
+ for ( int lx = 0; lx < links.size(); lx++ )
+ {
+ Element link = links.get( lx );
+ /*
+ * The abs:href loses directories, so we deal with absolute paths ourselves below in cleanLink
+ */
+ String target = link.attr( "href" );
+ if ( target != null)
+ {
+ String clean = cleanLink( baseURI, target );
+ if ( isAcceptableLink( clean ))
+ {
+ results.add( clean );
+ }
+ }
- Parser handler = new Parser( baseURI );
+ }
- XMLParserConfiguration parser = new HTMLConfiguration();
- parser.setDocumentHandler( handler );
- parser.setFeature( "http://cyberneko.org/html/features/augmentations", true );
- parser.setProperty( "http://cyberneko.org/html/properties/names/elems", "upper" );
- parser.setProperty( "http://cyberneko.org/html/properties/names/attrs", "upper" );
- parser.parse( new XMLInputSource( null, baseurl, baseURI.toString(), stream, "UTF-8" ) );
-
- return new ArrayList( handler.getLinks() );
-
+ ArrayList resultsAsList = new ArrayList();
+ resultsAsList.addAll( results );
+ return resultsAsList;
}
catch ( URISyntaxException e )
{
- throw new TransferFailedException( "Unable to parse as URI: " + baseurl );
+ throw new TransferFailedException( "Unable to parse as base URI: " + baseurl );
}
catch ( IOException e )
{
- throw new TransferFailedException( "I/O error: " + e.getMessage(), e );
+ throw new TransferFailedException( "I/O error reading HTML listing of artifacts: " + e.getMessage(), e );
}
}
- private static class Parser
- extends DefaultFilter
+ private static String cleanLink( URI baseURI, String link )
{
- // Apache Fancy Index Sort Headers
- private static final Pattern APACHE_INDEX_SKIP = Pattern.compile( "\\?[CDMNS]=.*" );
-
- // URLs with excessive paths.
- private static final Pattern URLS_WITH_PATHS = Pattern.compile( "/[^/]*/" );
-
- // URLs that to a parent directory.
- private static final Pattern URLS_TO_PARENT = Pattern.compile( "\\.\\./" );
-
- // mailto urls
- private static final Pattern MAILTO_URLS = Pattern.compile( "mailto:.*" );
-
- private static final Pattern[] SKIPS =
- new Pattern[] { APACHE_INDEX_SKIP, URLS_WITH_PATHS, URLS_TO_PARENT, MAILTO_URLS };
-
- private Set links = new HashSet();
-
- private URI baseURI;
-
- public Parser( URI baseURI )
+ if ( StringUtils.isEmpty( link ) )
{
- this.baseURI = baseURI.normalize();
+ return "";
}
- public Set getLinks()
+ String ret = link;
+
+ try
{
- return links;
+ URI linkuri = new URI( ret );
+ if ( link.startsWith( "/" ))
+ {
+ linkuri = baseURI.resolve( linkuri );
+ }
+ URI relativeURI = baseURI.relativize( linkuri ).normalize();
+ ret = relativeURI.toASCIIString();
+ if ( ret.startsWith( baseURI.getPath() ) )
+ {
+ ret = ret.substring( baseURI.getPath().length() );
+ }
+
+ ret = URLDecoder.decode( ret, "UTF-8" );
+ }
+ catch ( URISyntaxException e )
+ {
+ }
+ catch ( UnsupportedEncodingException e )
+ {
}
- public void startElement( QName element, XMLAttributes attrs, Augmentations augs )
+ return ret;
+ }
+
+ private static boolean isAcceptableLink( String link )
+ {
+ if ( StringUtils.isEmpty( link ) )
{
- if ( "A".equals( element.rawname ) )
- {
- String href = attrs.getValue( "HREF" );
- if ( href != null )
- {
- String link = cleanLink( baseURI, href );
- if ( isAcceptableLink( link ) )
- {
- links.add( link );
- }
- }
- }
+ return false;
}
- private static String cleanLink( URI baseURI, String link )
+ for ( int i = 0; i < SKIPS.length; i++ )
{
- if ( StringUtils.isEmpty( link ) )
- {
- return "";
- }
-
- String ret = link;
-
- try
- {
- URI linkuri = new URI( ret );
- URI relativeURI = baseURI.relativize( linkuri ).normalize();
- ret = relativeURI.toASCIIString();
- if ( ret.startsWith( baseURI.getPath() ) )
- {
- ret = ret.substring( baseURI.getPath().length() );
- }
-
- ret = URLDecoder.decode( ret, "UTF-8" );
- }
- catch ( URISyntaxException e )
- {
- }
- catch ( UnsupportedEncodingException e )
- {
- }
-
- return ret;
- }
-
- private static boolean isAcceptableLink( String link )
- {
- if ( StringUtils.isEmpty( link ) )
+ if ( SKIPS[i].matcher( link ).find() )
{
return false;
}
-
- for ( int i = 0; i < SKIPS.length; i++ )
- {
- if ( SKIPS[i].matcher( link ).find() )
- {
- return false;
- }
- }
-
- return true;
}
+
+ return true;
}
+
}
diff --git a/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java b/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
index 20eb485..1bdb23a 100644
--- a/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
+++ b/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
@@ -26,7 +26,6 @@
import junit.framework.TestCase;
-import org.apache.log4j.Logger;
import org.apache.maven.wagon.TransferFailedException;
/**
@@ -35,8 +34,6 @@
public class HtmlFileListParserTest
extends TestCase
{
- private static Logger logger = Logger.getLogger( HtmlFileListParserTest.class );
-
private void assertContainsExpected( List/*<String>*/links, String[] expected )
{
if ( expected.length != links.size() )
@@ -45,7 +42,7 @@
for ( Iterator iterator = links.iterator(); iterator.hasNext(); )
{
String link = (String) iterator.next();
- logger.info( " \"" + link + "\", " );
+ System.out.println( " \"" + link + "\", " );
}
assertEquals( "Links to Expected size", expected.length, links.size() );
}
@@ -79,7 +76,7 @@
Iterator it = files.iterator();
while ( it.hasNext() )
{
- logger.info( "File: '" + it.next() + "'" );
+ System.out.println( "File: '" + it.next() + "'" );
}
}
diff --git a/wagon-providers/wagon-http-shared4/pom.xml b/wagon-providers/wagon-http-shared4/pom.xml
deleted file mode 100644
index 81b408f..0000000
--- a/wagon-providers/wagon-http-shared4/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>wagon-http-shared4</artifactId>
- <name>Maven Wagon HTTP Shared Library 4</name>
- <description>
- Shared Library for the wagon-http, and wagon-http-lightweight wagon
- providers based on httpclient-4.x.
- </description>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jsoup</groupId>
- <artifactId>jsoup</artifactId>
- <version>1.6.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.1.1</version>
- </dependency>
- <!--
- This dependency is here to upgrade to a version of commons-logging that is
- newer than the one that comes transitively from commons-httpclient above.
- -->
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.0.1</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java b/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
deleted file mode 100644
index 61285d0..0000000
--- a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
+++ /dev/null
@@ -1,711 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URLEncoder;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-import java.util.zip.GZIPInputStream;
-
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpException;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.Credentials;
-import org.apache.http.auth.NTCredentials;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpHead;
-import org.apache.http.client.methods.HttpPut;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.params.ClientPNames;
-import org.apache.http.client.params.CookiePolicy;
-import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.params.ConnRoutePNames;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.impl.conn.SingleClientConnManager;
-import org.apache.http.impl.cookie.DateParseException;
-import org.apache.http.impl.cookie.DateUtils;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.params.CoreConnectionPNames;
-import org.apache.http.params.HttpParams;
-import org.apache.maven.wagon.InputData;
-import org.apache.maven.wagon.OutputData;
-import org.apache.maven.wagon.PathUtils;
-import org.apache.maven.wagon.ResourceDoesNotExistException;
-import org.apache.maven.wagon.StreamWagon;
-import org.apache.maven.wagon.TransferFailedException;
-import org.apache.maven.wagon.Wagon;
-import org.apache.maven.wagon.authorization.AuthorizationException;
-import org.apache.maven.wagon.events.TransferEvent;
-import org.apache.maven.wagon.proxy.ProxyInfo;
-import org.apache.maven.wagon.repository.Repository;
-import org.apache.maven.wagon.resource.Resource;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
- * @author <a href="mailto:james@atlassian.com">James William Dumay</a>
- */
-public abstract class AbstractHttpClientWagon
- extends StreamWagon
-{
- private final class RequestEntityImplementation
- implements HttpEntity
- {
- private final Resource resource;
-
- private final Wagon wagon;
-
- private final File source;
-
-
- private RequestEntityImplementation( final InputStream stream, final Resource resource, final Wagon wagon, final File source )
- throws TransferFailedException
- {
- if ( source != null )
- {
- this.source = source;
- }
- else
- {
- FileOutputStream fos = null;
- try
- {
- this.source = File.createTempFile( "http-wagon.", ".tmp" );
- this.source.deleteOnExit();
-
- fos = new FileOutputStream( this.source );
- IOUtil.copy( stream, fos );
- }
- catch ( IOException e )
- {
- fireTransferError( resource, e, TransferEvent.REQUEST_PUT );
- throw new TransferFailedException( "Failed to buffer stream contents to temp file for upload.", e );
- }
- finally
- {
- IOUtil.close( fos );
- }
- }
-
- this.resource = resource;
- this.wagon = wagon;
- }
-
- public long getContentLength()
- {
- return resource.getContentLength();
- }
-
- public Header getContentType()
- {
- return null;
- }
-
- public Header getContentEncoding()
- {
- return null;
- }
-
- public InputStream getContent() throws IOException, IllegalStateException
- {
- FileInputStream fis = new FileInputStream( source );
-
- return fis;
- }
-
- public boolean isRepeatable()
- {
- return true;
- }
-
- public boolean isChunked()
- {
- return false;
- }
-
- public void writeTo( OutputStream output )
- throws IOException
- {
- byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
-
- TransferEvent transferEvent =
- new TransferEvent( wagon, resource, TransferEvent.TRANSFER_PROGRESS, TransferEvent.REQUEST_PUT );
- transferEvent.setTimestamp( System.currentTimeMillis() );
-
- FileInputStream fin = null;
- try
- {
- fin = new FileInputStream( source );
- int remaining = Integer.MAX_VALUE;
- while ( remaining > 0 )
- {
- int n = fin.read( buffer, 0, Math.min( buffer.length, remaining ) );
-
- if ( n == -1 )
- {
- break;
- }
-
- fireTransferProgress( transferEvent, buffer, n );
-
- output.write( buffer, 0, n );
-
- remaining -= n;
- }
- }
- finally
- {
- IOUtil.close( fin );
- }
-
- output.flush();
- }
-
- public boolean isStreaming()
- {
- return false;
- }
-
- public void consumeContent() throws IOException
- {
- }
- }
-
- protected static final int SC_NULL = -1;
-
- protected static final TimeZone GMT_TIME_ZONE = TimeZone.getTimeZone( "GMT" );
-
- private DefaultHttpClient client;
-
- protected ClientConnectionManager connectionManager = new SingleClientConnManager();
-
- /**
- * @since 1.0-beta-6
- */
- private HttpConfiguration httpConfiguration;
-
- private HttpGet getMethod;
-
- public void openConnectionInternal()
- {
- repository.setUrl( getURL( repository ) );
- client = new DefaultHttpClient( connectionManager );
-
- // WAGON-273: default the cookie-policy to browser compatible
- client.getParams().setParameter( ClientPNames.COOKIE_POLICY, CookiePolicy.BROWSER_COMPATIBILITY );
-
- String username = null;
- String password = null;
-
- if ( authenticationInfo != null )
- {
- username = authenticationInfo.getUserName();
-
- password = authenticationInfo.getPassword();
- }
-
- if ( StringUtils.isNotEmpty( username ) && StringUtils.isNotEmpty( password ) )
- {
- Credentials creds = new UsernamePasswordCredentials( username, password );
-
- String host = getRepository().getHost();
- int port = getRepository().getPort() > -1 ? getRepository().getPort() : AuthScope.ANY_PORT;
-
- client.getCredentialsProvider().setCredentials( new AuthScope( host, port ), creds );
- }
-
- ProxyInfo proxyInfo = getProxyInfo( getRepository().getProtocol(), getRepository().getHost() );
- if ( proxyInfo != null )
- {
- String proxyUsername = proxyInfo.getUserName();
- String proxyPassword = proxyInfo.getPassword();
- String proxyHost = proxyInfo.getHost();
- int proxyPort = proxyInfo.getPort();
- String proxyNtlmHost = proxyInfo.getNtlmHost();
- String proxyNtlmDomain = proxyInfo.getNtlmDomain();
- if ( proxyHost != null )
- {
- HttpHost proxy = new HttpHost(proxyHost, proxyPort);
-
- if ( proxyUsername != null && proxyPassword != null )
- {
- Credentials creds;
- if ( proxyNtlmHost != null || proxyNtlmDomain != null )
- {
- creds = new NTCredentials( proxyUsername, proxyPassword, proxyNtlmHost, proxyNtlmDomain );
- }
- else
- {
- creds = new UsernamePasswordCredentials( proxyUsername, proxyPassword );
- }
-
- int port = proxyInfo.getPort() > -1 ? proxyInfo.getPort() : AuthScope.ANY_PORT;
-
- AuthScope authScope = new AuthScope( proxyHost, port );
- client.getCredentialsProvider().setCredentials( authScope, creds );
- }
-
- client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
- }
- }
- }
-
- public void closeConnection()
- {
- connectionManager.shutdown();
- }
-
- public void put( File source, String resourceName )
- throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
- {
- Resource resource = new Resource( resourceName );
-
- firePutInitiated( resource, source );
-
- resource.setContentLength( source.length() );
-
- resource.setLastModified( source.lastModified() );
-
- put( null, resource, source );
- }
-
- public void putFromStream( final InputStream stream, String destination, long contentLength, long lastModified )
- throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
- {
- Resource resource = new Resource( destination );
-
- firePutInitiated( resource, null );
-
- resource.setContentLength( contentLength );
-
- resource.setLastModified( lastModified );
-
- put( stream, resource, null );
- }
-
- private void put( final InputStream stream, Resource resource, File source )
- throws TransferFailedException, AuthorizationException, ResourceDoesNotExistException
- {
- String url = getRepository().getUrl();
- String[] parts = StringUtils.split( resource.getName(), "/" );
- for ( int i = 0; i < parts.length; i++ )
- {
- // TODO: Fix encoding...
- // url += "/" + URLEncoder.encode( parts[i], System.getProperty("file.encoding") );
- url += "/" + URLEncoder.encode( parts[i] );
- }
-
- //Parent directories need to be created before posting
- try
- {
- mkdirs( PathUtils.dirname( resource.getName() ) );
- }
- catch ( HttpException he )
- {
- fireTransferError( resource, he, TransferEvent.REQUEST_GET );
- }
- catch ( IOException e )
- {
- fireTransferError( resource, e, TransferEvent.REQUEST_GET );
- }
-
- HttpPut putMethod = new HttpPut( url );
-
- firePutStarted( resource, source );
-
- try
- {
- putMethod.setEntity(new RequestEntityImplementation(stream, resource, this, source));
-
- HttpResponse response;
- try
- {
- response = execute( putMethod );
- }
- catch ( IOException e )
- {
- fireTransferError( resource, e, TransferEvent.REQUEST_PUT );
-
- throw new TransferFailedException( e.getMessage(), e );
- }
- catch (HttpException e) {
- fireTransferError(resource, e, TransferEvent.REQUEST_PUT);
-
- throw new TransferFailedException( e.getMessage(), e );
- }
-
- int statusCode = response.getStatusLine().getStatusCode();
-
- fireTransferDebug( url + " - Status code: " + statusCode );
-
- // Check that we didn't run out of retries.
- switch ( statusCode )
- {
- // Success Codes
- case HttpStatus.SC_OK: // 200
- case HttpStatus.SC_CREATED: // 201
- case HttpStatus.SC_ACCEPTED: // 202
- case HttpStatus.SC_NO_CONTENT: // 204
- break;
-
- case SC_NULL:
- {
- TransferFailedException e = new TransferFailedException( "Failed to transfer file: " + url );
- fireTransferError( resource, e, TransferEvent.REQUEST_PUT );
- throw e;
- }
-
- case HttpStatus.SC_FORBIDDEN:
- fireSessionConnectionRefused();
- throw new AuthorizationException( "Access denied to: " + url );
-
- case HttpStatus.SC_NOT_FOUND:
- throw new ResourceDoesNotExistException( "File: " + url + " does not exist" );
-
- //add more entries here
- default :
- {
- TransferFailedException e =
- new TransferFailedException( "Failed to transfer file: " + url + ". Return code is: "
- + statusCode );
- fireTransferError( resource, e, TransferEvent.REQUEST_PUT );
- throw e;
- }
- }
-
- firePutCompleted( resource, source );
- }
- finally
- {
- putMethod.abort();
- }
- }
-
- protected void mkdirs( String dirname ) throws HttpException, IOException
- {
- // nothing to do
- }
-
- public boolean resourceExists( String resourceName )
- throws TransferFailedException, AuthorizationException
- {
- String url = getRepository().getUrl() + "/" + resourceName;
- HttpHead headMethod = new HttpHead( url );
- HttpResponse response = null;
- int statusCode;
- try
- {
- response = execute( headMethod );
- }
- catch ( IOException e )
- {
- throw new TransferFailedException( e.getMessage(), e );
- }
- catch (HttpException e) {
- throw new TransferFailedException( e.getMessage(), e );
- }
-
- try
- {
- statusCode = response.getStatusLine().getStatusCode();
- switch ( statusCode )
- {
- case HttpStatus.SC_OK:
- return true;
-
- case HttpStatus.SC_NOT_MODIFIED:
- return true;
-
- case SC_NULL:
- throw new TransferFailedException( "Failed to transfer file: " + url );
-
- case HttpStatus.SC_FORBIDDEN:
- throw new AuthorizationException( "Access denied to: " + url );
-
- case HttpStatus.SC_UNAUTHORIZED:
- throw new AuthorizationException( "Not authorized." );
-
- case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
- throw new AuthorizationException( "Not authorized by proxy." );
-
- case HttpStatus.SC_NOT_FOUND:
- return false;
-
- //add more entries here
- default:
- throw new TransferFailedException( "Failed to transfer file: " + url + ". Return code is: "
- + statusCode );
- }
- }
- finally
- {
- headMethod.abort();
- }
- }
-
- protected HttpResponse execute( HttpUriRequest httpMethod ) throws HttpException, IOException
- {
- int statusCode = SC_NULL;
-
- setParameters( httpMethod );
- setHeaders( httpMethod );
-
- return client.execute(httpMethod);
- }
-
- protected void setParameters( HttpUriRequest method )
- {
- HttpMethodConfiguration config = httpConfiguration == null ? null : httpConfiguration.getMethodConfiguration( method );
- if ( config != null )
- {
- HttpParams params = config.asMethodParams( method.getParams() );
- if ( params != null )
- {
- method.setParams( params );
- }
- }
-
- if ( config == null || config.getConnectionTimeout() == HttpMethodConfiguration.DEFAULT_CONNECTION_TIMEOUT )
- {
- method.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, getTimeout() );
- }
- }
-
- protected void setHeaders( HttpUriRequest method )
- {
- HttpMethodConfiguration config = httpConfiguration == null ? null : httpConfiguration.getMethodConfiguration( method );
- if ( config == null || config.isUseDefaultHeaders() )
- {
- // TODO: merge with the other headers and have some better defaults, unify with lightweight headers
- method.addHeader("Cache-control", "no-cache");
- method.addHeader("Cache-store", "no-store");
- method.addHeader("Pragma", "no-cache");
- method.addHeader("Expires", "0");
- method.addHeader("Accept-Encoding", "gzip");
- }
-
- Header[] headers = config == null ? null : config.asRequestHeaders();
- if ( headers != null )
- {
- for ( int i = 0; i < headers.length; i++ )
- {
- method.addHeader(headers[i]);
- }
- }
- }
-
- /**
- * getUrl
- * Implementors can override this to remove unwanted parts of the url such as role-hints
- * @param repository
- * @return
- */
- protected String getURL( Repository repository )
- {
- return repository.getUrl();
- }
-
- public HttpConfiguration getHttpConfiguration()
- {
- return httpConfiguration;
- }
-
- public void setHttpConfiguration( HttpConfiguration httpConfiguration )
- {
- this.httpConfiguration = httpConfiguration;
- }
-
- public void fillInputData( InputData inputData )
- throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
- {
- Resource resource = inputData.getResource();
-
- String url = getRepository().getUrl() + "/" + resource.getName();
- getMethod = new HttpGet( url );
- long timestamp = resource.getLastModified();
- if ( timestamp > 0 )
- {
- SimpleDateFormat fmt = new SimpleDateFormat( "EEE, dd-MMM-yy HH:mm:ss zzz", Locale.US );
- fmt.setTimeZone( GMT_TIME_ZONE );
- Header hdr = new BasicHeader( "If-Modified-Since", fmt.format( new Date( timestamp ) ) );
- fireTransferDebug( "sending ==> " + hdr + "(" + timestamp + ")" );
- getMethod.addHeader(hdr);
- }
-
- HttpResponse response;
- int statusCode;
- try
- {
- response = execute( getMethod );
- }
- catch ( IOException e )
- {
- fireTransferError( resource, e, TransferEvent.REQUEST_GET );
-
- throw new TransferFailedException( e.getMessage(), e );
- }
- catch (HttpException e) {
- fireTransferError(resource, e, TransferEvent.REQUEST_GET);
-
- throw new TransferFailedException( e.getMessage(), e );
- }
-
- statusCode = response.getStatusLine().getStatusCode();
-
- fireTransferDebug( url + " - Status code: " + statusCode );
-
- // TODO [BP]: according to httpclient docs, really should swallow the output on error. verify if that is
- // required
- switch ( statusCode )
- {
- case HttpStatus.SC_OK:
- break;
-
- case HttpStatus.SC_NOT_MODIFIED:
- // return, leaving last modified set to original value so getIfNewer should return unmodified
- return;
-
- case SC_NULL:
- {
- TransferFailedException e = new TransferFailedException( "Failed to transfer file: " + url );
- fireTransferError( resource, e, TransferEvent.REQUEST_GET );
- throw e;
- }
-
- case HttpStatus.SC_FORBIDDEN:
- fireSessionConnectionRefused();
- throw new AuthorizationException( "Access denied to: " + url );
-
- case HttpStatus.SC_UNAUTHORIZED:
- fireSessionConnectionRefused();
- throw new AuthorizationException( "Not authorized." );
-
- case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
- fireSessionConnectionRefused();
- throw new AuthorizationException( "Not authorized by proxy." );
-
- case HttpStatus.SC_NOT_FOUND:
- throw new ResourceDoesNotExistException( "File: " + url + " does not exist" );
-
- // add more entries here
- default:
- {
- cleanupGetTransfer( resource );
- TransferFailedException e =
- new TransferFailedException( "Failed to transfer file: " + url + ". Return code is: "
- + statusCode );
- fireTransferError( resource, e, TransferEvent.REQUEST_GET );
- throw e;
- }
- }
-
- InputStream is;
-
- Header contentLengthHeader = response.getFirstHeader("Content-Length");
-
- if ( contentLengthHeader != null )
- {
- try
- {
- long contentLength = Integer.valueOf( contentLengthHeader.getValue() ).intValue();
-
- resource.setContentLength( contentLength );
- }
- catch ( NumberFormatException e )
- {
- fireTransferDebug( "error parsing content length header '" + contentLengthHeader.getValue() + "' "
- + e );
- }
- }
-
- Header lastModifiedHeader = response.getFirstHeader("Last-Modified");
-
- long lastModified = 0;
-
- if ( lastModifiedHeader != null )
- {
- try
- {
- lastModified = DateUtils.parseDate( lastModifiedHeader.getValue() ).getTime();
-
- resource.setLastModified( lastModified );
- }
- catch ( DateParseException e )
- {
- fireTransferDebug( "Unable to parse last modified header" );
- }
-
- fireTransferDebug( "last-modified = " + lastModifiedHeader.getValue() + " (" + lastModified + ")" );
- }
-
- Header contentEncoding = response.getFirstHeader("Content-Encoding");
- boolean isGZipped =
- contentEncoding == null ? false : "gzip".equalsIgnoreCase( contentEncoding.getValue() );
-
- try
- {
- is = response.getEntity().getContent();
-
- if ( isGZipped )
- {
- is = new GZIPInputStream( is );
- }
- }
- catch ( IOException e )
- {
- fireTransferError( resource, e, TransferEvent.REQUEST_GET );
-
- String msg =
- "Error occurred while retrieving from remote repository:" + getRepository() + ": " + e.getMessage();
-
- throw new TransferFailedException( msg, e );
- }
-
- inputData.setInputStream( is );
- }
-
- protected void cleanupGetTransfer( Resource resource )
- {
- if ( getMethod != null )
- {
- getMethod.abort();
- }
- }
-
- public void fillOutputData( OutputData outputData )
- throws TransferFailedException
- {
- throw new IllegalStateException( "Should not be using the streaming wagon for HTTP PUT" );
- }
-}
diff --git a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java b/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
deleted file mode 100644
index d419c03..0000000
--- a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.maven.wagon.TransferFailedException;
-import org.codehaus.plexus.util.StringUtils;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-import org.jsoup.select.Elements;
-
-/**
- * Html File List Parser.
- */
-public class HtmlFileListParser
-{
- // Apache Fancy Index Sort Headers
- private static final Pattern APACHE_INDEX_SKIP = Pattern.compile( "\\?[CDMNS]=.*" );
-
- // URLs with excessive paths.
- private static final Pattern URLS_WITH_PATHS = Pattern.compile( "/[^/]*/" );
-
- // URLs that to a parent directory.
- private static final Pattern URLS_TO_PARENT = Pattern.compile( "\\.\\./" );
-
- // mailto urls
- private static final Pattern MAILTO_URLS = Pattern.compile( "mailto:.*" );
-
- private static final Pattern[] SKIPS = new Pattern[] { APACHE_INDEX_SKIP, URLS_WITH_PATHS, URLS_TO_PARENT,
- MAILTO_URLS };
-
- /**
- * Fetches a raw HTML from a provided InputStream, parses it, and returns the file list.
- *
- * @param stream the input stream.
- * @return the file list.
- * @throws TransferFailedException if there was a problem fetching the raw html.
- */
- public static List/* <String> */parseFileList( String baseurl, InputStream stream )
- throws TransferFailedException
- {
- try
- {
- URI baseURI = new URI( baseurl );
- // to make debugging easier, start with a string. This is assuming UTF-8, which might not be a safe
- // assumption.
- String content = IOUtils.toString( stream, "utf-8" );
- Document doc = Jsoup.parse( content, baseurl );
- Elements links = doc.getElementsByTag( "a" );
- Set results = new HashSet();
- for ( int lx = 0; lx < links.size(); lx++ )
- {
- Element link = links.get( lx );
- /*
- * The abs:href loses directories, so we deal with absolute paths ourselves below in cleanLink
- */
- String target = link.attr( "href" );
- if ( target != null)
- {
- String clean = cleanLink( baseURI, target );
- if ( isAcceptableLink( clean ))
- {
- results.add( clean );
- }
- }
-
- }
-
- ArrayList resultsAsList = new ArrayList();
- resultsAsList.addAll( results );
- return resultsAsList;
- }
- catch ( URISyntaxException e )
- {
- throw new TransferFailedException( "Unable to parse as base URI: " + baseurl );
- }
- catch ( IOException e )
- {
- throw new TransferFailedException( "I/O error reading HTML listing of artifacts: " + e.getMessage(), e );
- }
- }
-
- private static String cleanLink( URI baseURI, String link )
- {
- if ( StringUtils.isEmpty( link ) )
- {
- return "";
- }
-
- String ret = link;
-
- try
- {
- URI linkuri = new URI( ret );
- if ( link.startsWith( "/" ))
- {
- linkuri = baseURI.resolve( linkuri );
- }
- URI relativeURI = baseURI.relativize( linkuri ).normalize();
- ret = relativeURI.toASCIIString();
- if ( ret.startsWith( baseURI.getPath() ) )
- {
- ret = ret.substring( baseURI.getPath().length() );
- }
-
- ret = URLDecoder.decode( ret, "UTF-8" );
- }
- catch ( URISyntaxException e )
- {
- }
- catch ( UnsupportedEncodingException e )
- {
- }
-
- return ret;
- }
-
- private static boolean isAcceptableLink( String link )
- {
- if ( StringUtils.isEmpty( link ) )
- {
- return false;
- }
-
- for ( int i = 0; i < SKIPS.length; i++ )
- {
- if ( SKIPS[i].matcher( link ).find() )
- {
- return false;
- }
- }
-
- return true;
- }
-
-}
diff --git a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HttpConfiguration.java b/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HttpConfiguration.java
deleted file mode 100644
index 18fe0c0..0000000
--- a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HttpConfiguration.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpHead;
-import org.apache.http.client.methods.HttpPut;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HTTP;
-
-public class HttpConfiguration
-{
-
- private static final HttpMethodConfiguration DEFAULT_PUT =
- new HttpMethodConfiguration().addParam( HTTP.EXPECT_CONTINUE, "%b,true" );
-
- private HttpMethodConfiguration all;
-
- private HttpMethodConfiguration get;
-
- private HttpMethodConfiguration put;
-
- private HttpMethodConfiguration head;
-
- public HttpMethodConfiguration getAll()
- {
- return all;
- }
-
- public HttpConfiguration setAll( HttpMethodConfiguration all )
- {
- this.all = all;
- return this;
- }
-
- public HttpMethodConfiguration getGet()
- {
- return get;
- }
-
- public HttpConfiguration setGet( HttpMethodConfiguration get )
- {
- this.get = get;
- return this;
- }
-
- public HttpMethodConfiguration getPut()
- {
- return put;
- }
-
- public HttpConfiguration setPut( HttpMethodConfiguration put )
- {
- this.put = put;
- return this;
- }
-
- public HttpMethodConfiguration getHead()
- {
- return head;
- }
-
- public HttpConfiguration setHead( HttpMethodConfiguration head )
- {
- this.head = head;
- return this;
- }
-
- public HttpMethodConfiguration getMethodConfiguration( HttpUriRequest method )
- {
- if ( method instanceof HttpGet )
- {
- return HttpMethodConfiguration.merge( all, get );
- }
- else if ( method instanceof HttpPut)
- {
- return HttpMethodConfiguration.merge( DEFAULT_PUT, all, put );
- }
- else if ( method instanceof HttpHead)
- {
- return HttpMethodConfiguration.merge( all, head );
- }
-
- return all;
- }
-
-}
diff --git a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HttpMethodConfiguration.java b/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HttpMethodConfiguration.java
deleted file mode 100644
index 7ff555d..0000000
--- a/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/HttpMethodConfiguration.java
+++ /dev/null
@@ -1,324 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.http.Header;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.CoreConnectionPNames;
-import org.apache.http.params.DefaultedHttpParams;
-import org.apache.http.params.HttpParams;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class HttpMethodConfiguration
-{
-
- public static final int DEFAULT_CONNECTION_TIMEOUT = 60000;
-
- private static final String COERCE_PATTERN = "%(\\w+),(.+)";
-
- private Boolean useDefaultHeaders;
-
- private Properties headers = new Properties();
-
- private Properties params = new Properties();
-
- private int connectionTimeout = DEFAULT_CONNECTION_TIMEOUT;
-
- public boolean isUseDefaultHeaders()
- {
- return useDefaultHeaders == null || useDefaultHeaders.booleanValue();
- }
-
- public HttpMethodConfiguration setUseDefaultHeaders( boolean useDefaultHeaders )
- {
- this.useDefaultHeaders = Boolean.valueOf( useDefaultHeaders );
- return this;
- }
-
- public Boolean getUseDefaultHeaders()
- {
- return useDefaultHeaders;
- }
-
- public HttpMethodConfiguration addHeader( String header, String value )
- {
- headers.setProperty( header, value );
- return this;
- }
-
- public Properties getHeaders()
- {
- return headers;
- }
-
- public HttpMethodConfiguration setHeaders( Properties headers )
- {
- this.headers = headers;
- return this;
- }
-
- public HttpMethodConfiguration addParam( String param, String value )
- {
- params.setProperty( param, value );
- return this;
- }
-
- public Properties getParams()
- {
- return params;
- }
-
- public HttpMethodConfiguration setParams( Properties params )
- {
- this.params = params;
- return this;
- }
-
- public int getConnectionTimeout()
- {
- return connectionTimeout;
- }
-
- public HttpMethodConfiguration setConnectionTimeout( int connectionTimeout )
- {
- this.connectionTimeout = connectionTimeout;
- return this;
- }
-
- public HttpParams asMethodParams( HttpParams defaults )
- {
- if ( !hasParams() )
- {
- return null;
- }
-
- DefaultedHttpParams p = new DefaultedHttpParams( new BasicHttpParams(), defaults);
-
- fillParams( p );
-
- return p;
- }
-
- private boolean hasParams()
- {
- if ( connectionTimeout < 1 && params == null )
- {
- return false;
- }
-
- return true;
- }
-
- private void fillParams( HttpParams p )
- {
- if ( !hasParams() )
- {
- return;
- }
-
- if ( connectionTimeout > 0 )
- {
- p.setParameter( CoreConnectionPNames.SO_TIMEOUT, connectionTimeout );
- }
-
- if ( params != null )
- {
- Pattern coercePattern = Pattern.compile( COERCE_PATTERN );
-
- for ( Iterator it = params.entrySet().iterator(); it.hasNext(); )
- {
- Map.Entry entry = (Map.Entry) it.next();
-
- String key = (String) entry.getKey();
- String value = (String) entry.getValue();
-
- Matcher matcher = coercePattern.matcher( value );
- if ( matcher.matches() )
- {
- char type = matcher.group( 1 ).charAt( 0 );
- value = matcher.group( 2 );
-
- switch( type )
- {
- case 'i':
- {
- p.setIntParameter( key, Integer.parseInt( value ) );
- break;
- }
- case 'd':
- {
- p.setDoubleParameter( key, Double.parseDouble( value ) );
- break;
- }
- case 'l':
- {
- p.setLongParameter( key, Long.parseLong( value ) );
- break;
- }
- case 'b':
- {
- p.setBooleanParameter( key, Boolean.valueOf( value ).booleanValue() );
- break;
- }
- case 'c':
- {
- String[] entries = value.split( "," );
- List collection = new ArrayList();
- for ( int i = 0; i < entries.length; i++ )
- {
- collection.add( entries[i].trim() );
- }
-
- p.setParameter( key, collection );
- break;
- }
- case 'm':
- {
- String[] entries = value.split( "," );
-
- Map map = new LinkedHashMap();
- for ( int i = 0; i < entries.length; i++ )
- {
- int idx = entries[i].indexOf( "=>" );
- if ( idx < 1 )
- {
- break;
- }
-
- String mapKey = entries[i].substring( 0, idx );
- String mapVal = entries[i].substring( idx + 1, entries[i].length() );
- map.put( mapKey.trim(), mapVal.trim() );
- }
-
- p.setParameter( key, map );
- break;
- }
- }
- }
- else
- {
- p.setParameter( key, value );
- }
- }
- }
- }
-
- public Header[] asRequestHeaders()
- {
- if ( headers == null )
- {
- return null;
- }
-
- Header[] result = new Header[headers.size()];
-
- int index = 0;
- for ( Iterator it = headers.entrySet().iterator(); it.hasNext(); )
- {
- Map.Entry entry = (Map.Entry) it.next();
-
- String key = (String) entry.getKey();
- String value = (String) entry.getValue();
-
- Header header = new BasicHeader( key, value );
- result[index++] = header;
- }
-
- return result;
- }
-
- private HttpMethodConfiguration copy()
- {
- HttpMethodConfiguration copy = new HttpMethodConfiguration();
-
- copy.setConnectionTimeout( getConnectionTimeout() );
- if ( getHeaders() != null )
- {
- copy.setHeaders( getHeaders() );
- }
-
- if ( getParams() != null )
- {
- copy.setParams( getParams() );
- }
-
- copy.setUseDefaultHeaders( isUseDefaultHeaders() );
-
- return copy;
- }
-
- public static HttpMethodConfiguration merge( HttpMethodConfiguration defaults, HttpMethodConfiguration base, HttpMethodConfiguration local )
- {
- HttpMethodConfiguration result = merge( defaults, base );
- return merge( result, local );
- }
-
- public static HttpMethodConfiguration merge( HttpMethodConfiguration base, HttpMethodConfiguration local )
- {
- if ( base == null && local == null )
- {
- return null;
- }
- else if ( base == null )
- {
- return local;
- }
- else if ( local == null )
- {
- return base;
- }
- else
- {
- HttpMethodConfiguration result = base.copy();
-
- if ( local.getConnectionTimeout() != DEFAULT_CONNECTION_TIMEOUT )
- {
- result.setConnectionTimeout( local.getConnectionTimeout() );
- }
-
- if ( local.getHeaders() != null )
- {
- result.getHeaders().putAll( local.getHeaders() );
- }
-
- if ( local.getParams() != null )
- {
- result.getParams().putAll( local.getParams() );
- }
-
- if ( local.getUseDefaultHeaders() != null )
- {
- result.setUseDefaultHeaders( local.isUseDefaultHeaders() );
- }
-
- return result;
- }
- }
-
-}
diff --git a/wagon-providers/wagon-http-shared4/src/site/site.xml b/wagon-providers/wagon-http-shared4/src/site/site.xml
deleted file mode 100644
index 15f431a..0000000
--- a/wagon-providers/wagon-http-shared4/src/site/site.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<project>
- <body>
- <menu ref="parent"/>
- <menu ref="reports"/>
- </body>
-</project>
\ No newline at end of file
diff --git a/wagon-providers/wagon-http-shared4/src/test/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagonTest.java b/wagon-providers/wagon-http-shared4/src/test/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagonTest.java
deleted file mode 100644
index 7e9503f..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagonTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-import junit.framework.TestCase;
-import org.apache.http.Header;
-import org.apache.http.client.methods.HttpHead;
-import org.apache.http.client.params.ClientPNames;
-import org.apache.http.params.HttpParams;
-
-public class AbstractHttpClientWagonTest
- extends TestCase
-{
-
- public void testSetPreemptiveAuthParamViaConfig()
- {
- HttpMethodConfiguration methodConfig = new HttpMethodConfiguration();
- //X TODO methodConfig.addParam( HttpClientParams.PREEMPTIVE_AUTHENTICATION, "%b,true" );
-
- HttpConfiguration config = new HttpConfiguration();
- config.setAll( methodConfig );
-
- TestWagon wagon = new TestWagon();
- wagon.setHttpConfiguration( config );
-
- HttpHead method = new HttpHead();
- wagon.setParameters( method );
-
- HttpParams params = method.getParams();
- assertNotNull( params );
- //X TODO assertTrue( params.isParameterTrue( HttpClientParams.PREEMPTIVE_AUTHENTICATION ) );
- }
-
- public void testSetMaxRedirectsParamViaConfig()
- {
- HttpMethodConfiguration methodConfig = new HttpMethodConfiguration();
- int maxRedirects = 2;
- methodConfig.addParam( ClientPNames.MAX_REDIRECTS, "%i," + maxRedirects );
-
- HttpConfiguration config = new HttpConfiguration();
- config.setAll( methodConfig );
-
- TestWagon wagon = new TestWagon();
- wagon.setHttpConfiguration( config );
-
- HttpHead method = new HttpHead();
- wagon.setParameters( method );
-
- HttpParams params = method.getParams();
- assertNotNull( params );
- assertEquals( maxRedirects, params.getIntParameter( ClientPNames.MAX_REDIRECTS, -1 ) );
- }
-
- public void testDefaultHeadersUsedByDefault()
- {
- HttpConfiguration config = new HttpConfiguration();
- config.setAll( new HttpMethodConfiguration() );
-
- TestWagon wagon = new TestWagon();
- wagon.setHttpConfiguration( config );
-
- HttpHead method = new HttpHead();
- wagon.setHeaders( method );
-
- // these are the default headers.
- // method.addRequestHeader( "Cache-control", "no-cache" );
- // method.addRequestHeader( "Cache-store", "no-store" );
- // method.addRequestHeader( "Pragma", "no-cache" );
- // method.addRequestHeader( "Expires", "0" );
- // method.addRequestHeader( "Accept-Encoding", "gzip" );
-
- Header header = method.getFirstHeader( "Cache-control" );
- assertNotNull( header );
- assertEquals( "no-cache", header.getValue() );
-
- header = method.getFirstHeader( "Cache-store" );
- assertNotNull( header );
- assertEquals( "no-store", header.getValue() );
-
- header = method.getFirstHeader( "Pragma" );
- assertNotNull( header );
- assertEquals( "no-cache", header.getValue() );
-
- header = method.getFirstHeader( "Expires" );
- assertNotNull( header );
- assertEquals( "0", header.getValue() );
-
- header = method.getFirstHeader( "Accept-Encoding" );
- assertNotNull( header );
- assertEquals( "gzip", header.getValue() );
- }
-
- public void testTurnOffDefaultHeaders()
- {
- HttpConfiguration config = new HttpConfiguration();
- config.setAll( new HttpMethodConfiguration().setUseDefaultHeaders( false ) );
-
- TestWagon wagon = new TestWagon();
- wagon.setHttpConfiguration( config );
-
- HttpHead method = new HttpHead();
- wagon.setHeaders( method );
-
- // these are the default headers.
- // method.addRequestHeader( "Cache-control", "no-cache" );
- // method.addRequestHeader( "Cache-store", "no-store" );
- // method.addRequestHeader( "Pragma", "no-cache" );
- // method.addRequestHeader( "Expires", "0" );
- // method.addRequestHeader( "Accept-Encoding", "gzip" );
-
- Header header = method.getFirstHeader( "Cache-control" );
- assertNull( header );
-
- header = method.getFirstHeader( "Cache-store" );
- assertNull( header );
-
- header = method.getFirstHeader( "Pragma" );
- assertNull( header );
-
- header = method.getFirstHeader( "Expires" );
- assertNull( header );
-
- header = method.getFirstHeader( "Accept-Encoding" );
- assertNull( header );
- }
-
- private static final class TestWagon
- extends AbstractHttpClientWagon
- {
- }
-
-}
diff --git a/wagon-providers/wagon-http-shared4/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java b/wagon-providers/wagon-http-shared4/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
deleted file mode 100644
index bc24952..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
+++ /dev/null
@@ -1,728 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.TestCase;
-import org.apache.log4j.Logger;
-import org.apache.maven.wagon.TransferFailedException;
-
-/**
- * Unit Tests for the HtmlFileListParser
- */
-public class HtmlFileListParserTest
- extends TestCase
-{
- private static Logger logger = Logger.getLogger( HtmlFileListParserTest.class );
-
- private void assertContainsExpected( List/*<String>*/links, String[] expected )
- {
- if ( expected.length != links.size() )
- {
- Collections.sort( links );
- for ( Iterator iterator = links.iterator(); iterator.hasNext(); )
- {
- String link = (String) iterator.next();
- logger.info( " \"" + link + "\", " );
- }
- assertEquals( "Links to Expected size", expected.length, links.size() );
- }
-
- for ( int i = 0; i < expected.length; i++ )
- {
- assertTrue( "Should find [" + expected[i] + "] in link list", links.contains( expected[i] ) );
- }
- }
-
- private void assertNotContainingAvoided( List/*<String>*/links, String[] avoided )
- {
- for ( int i = 0; i < avoided.length; i++ )
- {
- assertFalse( "Should not find [" + avoided[i] + "] in link list", links.contains( avoided[i] ) );
- }
- }
-
- private List/*<String>*/parseLinks( String url, String filename )
- throws TransferFailedException
- {
- InputStream is = this.getClass().getResourceAsStream( "/filelistings/" + filename );
- List files = HtmlFileListParser.parseFileList( url, is );
-
- assertNotNull( "file list should not be null.", files );
- assertFalse( "file list should not be empty.", files.isEmpty() );
-
- /* Debug */
- if ( false )
- {
- Iterator it = files.iterator();
- while ( it.hasNext() )
- {
- logger.info( "File: '" + it.next() + "'" );
- }
- }
-
- return files;
- }
-
- /**
- * Example showing jetty directory browsing of commons-lang
- *
- * @throws TransferFailedException
- */
- public void testParseCommonsLang()
- throws TransferFailedException
- {
- List/*<String>*/links = parseLinks( "http://localhost/repository/commons-lang/commons-lang/2.3",
- "commons-lang.html" );
-
- String[] expected = new String[] {
- "commons-lang-2.3-javadoc.jar",
- "commons-lang-2.3-javadoc.jar.asc",
- "commons-lang-2.3-javadoc.jar.md5",
- "commons-lang-2.3-javadoc.jar.sha1",
- "commons-lang-2.3-sources.jar",
- "commons-lang-2.3-sources.jar.asc",
- "commons-lang-2.3-sources.jar.md5",
- "commons-lang-2.3-sources.jar.sha1",
- "commons-lang-2.3.jar",
- "commons-lang-2.3.jar.asc",
- "commons-lang-2.3.jar.md5",
- "commons-lang-2.3.jar.sha1",
- "commons-lang-2.3.pom",
- "commons-lang-2.3.pom.md5",
- "commons-lang-2.3.pom.sha1",
- "maven-metadata.xml",
- "maven-metadata.xml.md5",
- "maven-metadata.xml.sha1" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "../" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- public void testParseIbiblio()
- throws Exception
- {
- List/*<String>*/links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon/",
- "ibiblio-wagon.html" );
-
- String[] expected = new String[] {
- "wagon-1.0-alpha-2.pom",
- "wagon-1.0-alpha-2.pom.asc",
- "wagon-1.0-alpha-2.pom.md5",
- "wagon-1.0-alpha-2.pom.sha1",
- "wagon-1.0-alpha-3-20050413.021234-4.pom",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
- "wagon-1.0-alpha-3-20050419.043745-5.pom",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
- "wagon-1.0-alpha-3-20050419.044035-6.pom",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
- "wagon-1.0-alpha-3-20050421.162738-7.pom",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
- "wagon-1.0-alpha-3-20050422.075233-8.pom",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
- "wagon-1.0-alpha-3-20050429.051847-9.pom",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
- "wagon-file/",
- "wagon-ftp/",
- "wagon-http-lightweight/",
- "wagon-http/",
- "wagon-lightweight-http/",
- "wagon-provider-api/",
- "wagon-provider-test/",
- "wagon-provider/",
- "wagon-providers-1.0-alpha-2.pom",
- "wagon-providers-1.0-alpha-2.pom.asc",
- "wagon-providers-1.0-alpha-2.pom.md5",
- "wagon-providers-1.0-alpha-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
- "wagon-providers/",
- "wagon-scm/",
- "wagon-ssh-external/",
- "wagon-ssh/",
- "wagon-webdav/",
- "wagon/" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A", "?D=A", "?M=A", "?N=D", "?S=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- /**
- * Test of an html which is improperly formatted, and contains full host-specific paths to the resources.
- * @throws Exception
- */
- public void testParseJetty()
- throws Exception
- {
- List/*<String>*/links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon/",
- "jetty-wagon.html" );
-
- String[] expected = new String[] {
- "wagon-1.0-alpha-2.pom",
- "wagon-1.0-alpha-2.pom.asc",
- "wagon-1.0-alpha-2.pom.md5",
- "wagon-1.0-alpha-2.pom.sha1",
- "wagon-1.0-alpha-3-20050413.021234-4.pom",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
- "wagon-1.0-alpha-3-20050419.043745-5.pom",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
- "wagon-1.0-alpha-3-20050419.044035-6.pom",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
- "wagon-1.0-alpha-3-20050421.162738-7.pom",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
- "wagon-1.0-alpha-3-20050422.075233-8.pom",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
- "wagon-1.0-alpha-3-20050429.051847-9.pom",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
- "wagon-file/",
- "wagon-ftp/",
- "wagon-http-lightweight/",
- "wagon-http/",
- "wagon-lightweight-http/",
- "wagon-provider-api/",
- "wagon-provider-test/",
- "wagon-provider/",
- "wagon-providers-1.0-alpha-2.pom",
- "wagon-providers-1.0-alpha-2.pom.asc",
- "wagon-providers-1.0-alpha-2.pom.md5",
- "wagon-providers-1.0-alpha-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
- "wagon-providers/",
- "wagon-scm/",
- "wagon-ssh-external/",
- "wagon-ssh/",
- "wagon-webdav/",
- "wagon/" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- /**
- * Test of an html which is improperly formatted, contains full host-specific paths to the resources and uses non-normalized base URI
- * @throws Exception
- */
- public void testParseJettyWithNonNormalizedBaseURI()
- throws Exception
- {
- List/*<String>*/links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon//",
- "jetty-wagon.html" );
-
- String[] expected = new String[] {
- "wagon-1.0-alpha-2.pom",
- "wagon-1.0-alpha-2.pom.asc",
- "wagon-1.0-alpha-2.pom.md5",
- "wagon-1.0-alpha-2.pom.sha1",
- "wagon-1.0-alpha-3-20050413.021234-4.pom",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
- "wagon-1.0-alpha-3-20050419.043745-5.pom",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
- "wagon-1.0-alpha-3-20050419.044035-6.pom",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
- "wagon-1.0-alpha-3-20050421.162738-7.pom",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
- "wagon-1.0-alpha-3-20050422.075233-8.pom",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
- "wagon-1.0-alpha-3-20050429.051847-9.pom",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
- "wagon-file/",
- "wagon-ftp/",
- "wagon-http-lightweight/",
- "wagon-http/",
- "wagon-lightweight-http/",
- "wagon-provider-api/",
- "wagon-provider-test/",
- "wagon-provider/",
- "wagon-providers-1.0-alpha-2.pom",
- "wagon-providers-1.0-alpha-2.pom.asc",
- "wagon-providers-1.0-alpha-2.pom.md5",
- "wagon-providers-1.0-alpha-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
- "wagon-providers/",
- "wagon-scm/",
- "wagon-ssh-external/",
- "wagon-ssh/",
- "wagon-webdav/",
- "wagon/" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- /**
- * Using repository.codehaus.org output as an example.
- * This is an example of an older RHEL installation of apache httpd with old fancy indexing output
- * This example tests how to detect directories properly.
- *
- * @throws TransferFailedException
- */
- public void testParseMevenIde()
- throws TransferFailedException
- {
- List/*<String>*/links = parseLinks( "http://repository.codehaus.org/org/codehaus/mevenide/", "mevenide.html" );
-
- String[] expected = new String[] {
- "apisupport/",
- "autoupdate/",
- "continuum-rpc/",
- "continuum/",
- "debugger-bridge/",
- "deployment-bridge/",
- "feature/",
- "grammar/",
- "ide-mojos/",
- "indexer/",
- "j2ee/",
- "junit/",
- "maven-metadata.xml",
- "maven-metadata.xml.md5",
- "maven-metadata.xml.sha1",
- "mevenide2-parent/",
- "nb-mvn-embedder/",
- "nb-project/",
- "nb-repo-browser/",
- "netbeans-debugger-plugin/",
- "netbeans-deploy-plugin/",
- "netbeans-libs/",
- "netbeans-nbmreload-plugin/",
- "netbeans-repository/",
- "netbeans-run-plugin/",
- "netbeans/",
- "persistence/",
- "plugin-bridges/",
- "plugins/",
- "reload-nbm-bridge/",
- "run-jar-bridge/" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "/org/codehaus/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- public void testParseMirror()
- throws Exception
- {
- List/*<String>*/links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon/",
- "mirror-wagon.html" );
-
- String[] expected = new String[] {
- "wagon-1.0-alpha-2.pom",
- "wagon-1.0-alpha-2.pom.asc",
- "wagon-1.0-alpha-2.pom.md5",
- "wagon-1.0-alpha-2.pom.sha1",
- "wagon-1.0-alpha-3-20050413.021234-4.pom",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
- "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
- "wagon-1.0-alpha-3-20050419.043745-5.pom",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
- "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
- "wagon-1.0-alpha-3-20050419.044035-6.pom",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
- "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
- "wagon-1.0-alpha-3-20050421.162738-7.pom",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
- "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
- "wagon-1.0-alpha-3-20050422.075233-8.pom",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
- "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
- "wagon-1.0-alpha-3-20050429.051847-9.pom",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
- "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
- "wagon-file/",
- "wagon-ftp/",
- "wagon-http-lightweight/",
- "wagon-http/",
- "wagon-lightweight-http/",
- "wagon-provider-api/",
- "wagon-provider-test/",
- "wagon-provider/",
- "wagon-providers-1.0-alpha-2.pom",
- "wagon-providers-1.0-alpha-2.pom.asc",
- "wagon-providers-1.0-alpha-2.pom.md5",
- "wagon-providers-1.0-alpha-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
- "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
- "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
- "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
- "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
- "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
- "wagon-providers/",
- "wagon-scm/",
- "wagon-ssh-external/",
- "wagon-ssh/",
- "wagon-webdav/",
- "wagon/" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] {
- "/org/codehaus/",
- "?C=S;O=A",
- "?C=D;O=A",
- "?C=M;O=A",
- "mailto:mirror.admin@mirror.com" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- /**
- * Example of output from repo1.maven.org
- * This example is of nekohtml specifically.
- *
- * @throws TransferFailedException
- */
- public void testParseNekoHtml()
- throws TransferFailedException
- {
- List/*<String>*/links = parseLinks( "http://repo1.maven.org//maven2/nekohtml/nekohtml/1.9.6/", "nekohtml.html" );
-
- String[] expected = new String[] {
- "nekohtml-1.9.6-javadoc.jar",
- "nekohtml-1.9.6-javadoc.jar.md5",
- "nekohtml-1.9.6-javadoc.jar.sha1",
- "nekohtml-1.9.6-sources.jar",
- "nekohtml-1.9.6-sources.jar.md5",
- "nekohtml-1.9.6-sources.jar.sha1",
- "nekohtml-1.9.6.jar",
- "nekohtml-1.9.6.jar.md5",
- "nekohtml-1.9.6.jar.sha1",
- "nekohtml-1.9.6.pom",
- "nekohtml-1.9.6.pom.md5",
- "nekohtml-1.9.6.pom.sha1" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "/maven2/nekohtml/nekohtml/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- /**
- * Example of detecting directories on repo1.maven.org
- *
- * @throws TransferFailedException
- */
- public void testParseNetSourceforge()
- throws TransferFailedException
- {
- List/*<String>*/links = parseLinks( "http://repo1.maven.org/maven2/net/sf/", "net_sf.html" );
-
- String[] expected = new String[] {
- "a2j/",
- "aislib/",
- "alchim/",
- "antenna/",
- "apt-jelly/",
- "beanlib/",
- "bluecove/",
- "buildbox/",
- "click/",
- "clirr/",
- "datavision/",
- "dozer/",
- "dtddoc/",
- "dynpageplus/",
- "ehcache/",
- "ezmorph/",
- "falcon/",
- "grester/",
- "gwt-widget/",
- "hermesftp/",
- "hibernate/",
- "jcharts/",
- "jdatabaseimport/",
- "jeceira/",
- "jfcunit/",
- "jfig/",
- "jguard/",
- "jipcam/",
- "jlynx/",
- "jour/",
- "jpf/",
- "json-lib/",
- "jsptest/",
- "jsr107cache/",
- "jt400/",
- "jxls/",
- "kxml/",
- "ldaptemplate/",
- "locale4j/",
- "mapasuta/",
- "maven-har/",
- "maven-sar/",
- "opencsv/",
- "oval/",
- "proguard/",
- "qdwizard/",
- "resultsetmapper/",
- "retrotranslator/",
- "saxon/",
- "shadesdb/",
- "smc/",
- "speculoos/",
- "springlayout/",
- "stat-scm/",
- "statsvn/",
- "stax/",
- "struts/",
- "tacos/",
- "testextensions/",
- "webdav-servlet/" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "/maven2/net/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- /**
- * Another larger example of the directory link detection on repository.codehaus.org
- *
- * @throws TransferFailedException
- */
- public void testParseOrgCodehaus()
- throws TransferFailedException
- {
- List/*<String>*/links = parseLinks( "http://repository.codehaus.org/org/codehaus", "org.codehaus.html" );
-
- String[] expected = new String[] {
- "agilifier/",
- "benji/",
- "bruce/",
- "btm/",
- "cargo/",
- "castor-spring/",
- "castor/",
- "cozmos/",
- "dataforge/",
- "dimple/",
- "droolsdotnet/",
- "enunciate/",
- "fabric3/",
- "gant/",
- "grails-plugins/",
- "groovy/",
- "gsoc/",
- "guessencoding/",
- "gumtree/",
- "gwt-openlayers/",
- "haus/",
- "izpack/",
- "javasim/",
- "jedi/",
- "jequel/",
- "jet/",
- "jettison/",
- "jfdi/",
- "jikesrvm/",
- "jra/",
- "jremoting/",
- "jtestme/",
- "jtestr/",
- "labs-ng/",
- "logicabyss/",
- "marionette/",
- "mevenide/",
- "modello/",
- "mojo/",
- "mvel/",
- "mvflex/",
- "native-mojo/",
- "openim/",
- "plexus/",
- "polymap/",
- "prometheus/",
- "prophit/",
- "quaere/",
- "redback/",
- "rulessandpit/",
- "rvm/",
- "savana/",
- "scala-ide/",
- "senro/",
- "sonar/",
- "staxmate/",
- "stomp/",
- "svn4j/",
- "swiby/",
- "swizzle/",
- "sxc/",
- "testdox/",
- "wadi/",
- "waffle/",
- "woodstox/",
- "xdoclet/",
- "xfire/",
- "xharness/",
- "xsite/",
- "xstream/",
- "xwire/" };
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-
- /**
- * Test the output found from apache httpd with fancy indexing and dav module.
- * Using people.apache.org output as source material.
- *
- * @throws TransferFailedException
- */
- public void testParsePeopleApacheOrg()
- throws TransferFailedException
- {
- List/*<String>*/links = parseLinks(
- "http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/maven/archiva/archiva-plexus-runtime/1.0.1/",
- "org.apache.maven.html" );
-
- String[] expected = new String[] {
- "archiva-plexus-runtime-1.0.1-bin.tar.gz",
- "archiva-plexus-runtime-1.0.1-bin.tar.gz.asc",
- "archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.md5",
- "archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.sha1",
- "archiva-plexus-runtime-1.0.1-bin.tar.gz.md5",
- "archiva-plexus-runtime-1.0.1-bin.tar.gz.sha1",
- "archiva-plexus-runtime-1.0.1-bin.zip",
- "archiva-plexus-runtime-1.0.1-bin.zip.asc",
- "archiva-plexus-runtime-1.0.1-bin.zip.asc.md5",
- "archiva-plexus-runtime-1.0.1-bin.zip.asc.sha1",
- "archiva-plexus-runtime-1.0.1-bin.zip.md5",
- "archiva-plexus-runtime-1.0.1-bin.zip.sha1",
- "archiva-plexus-runtime-1.0.1-sources.jar",
- "archiva-plexus-runtime-1.0.1-sources.jar.asc",
- "archiva-plexus-runtime-1.0.1-sources.jar.asc.md5",
- "archiva-plexus-runtime-1.0.1-sources.jar.asc.sha1",
- "archiva-plexus-runtime-1.0.1-sources.jar.md5",
- "archiva-plexus-runtime-1.0.1-sources.jar.sha1",
- "archiva-plexus-runtime-1.0.1.jar",
- "archiva-plexus-runtime-1.0.1.jar.asc",
- "archiva-plexus-runtime-1.0.1.jar.asc.md5",
- "archiva-plexus-runtime-1.0.1.jar.asc.sha1",
- "archiva-plexus-runtime-1.0.1.jar.md5",
- "archiva-plexus-runtime-1.0.1.jar.sha1",
- "archiva-plexus-runtime-1.0.1.pom",
- "archiva-plexus-runtime-1.0.1.pom.asc",
- "archiva-plexus-runtime-1.0.1.pom.asc.md5",
- "archiva-plexus-runtime-1.0.1.pom.asc.sha1",
- "archiva-plexus-runtime-1.0.1.pom.md5",
- "archiva-plexus-runtime-1.0.1.pom.sha1",
- "readme artifacts.txt"};
-
- assertContainsExpected( links, expected );
-
- String[] avoided = new String[] {
- "/repo/m2-ibiblio-rsync-repository/org/apache/maven/archiva/archiva-plexus-runtime/",
- "?C=S;O=A",
- "?C=D;O=A",
- "?C=M;O=A" };
-
- assertNotContainingAvoided( links, avoided );
- }
-}
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/commons-lang.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/commons-lang.html
deleted file mode 100644
index 66659ef..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/commons-lang.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<html>
-<head>
-<title>Collection: /commons-lang/commons-lang/2.3/</title>
-</head>
-<body>
-<h2>Collection: /commons-lang/commons-lang/2.3/</h2>
-<ul>
-<li><a href="../">commons-lang/</a> <i><small>(Parent)</small></i></li>
-</ul>
-<ul>
-<li><a href="./commons-lang-2.3-javadoc.jar">commons-lang-2.3-javadoc.jar</li>
-<li><a href="./commons-lang-2.3-javadoc.jar.asc">commons-lang-2.3-javadoc.jar.asc</li>
-<li><a href="./commons-lang-2.3-javadoc.jar.md5">commons-lang-2.3-javadoc.jar.md5</li>
-<li><a href="./commons-lang-2.3-javadoc.jar.sha1">commons-lang-2.3-javadoc.jar.sha1</li>
-<li><a href="./commons-lang-2.3-sources.jar">commons-lang-2.3-sources.jar</li>
-<li><a href="./commons-lang-2.3-sources.jar.asc">commons-lang-2.3-sources.jar.asc</li>
-<li><a href="./commons-lang-2.3-sources.jar.md5">commons-lang-2.3-sources.jar.md5</li>
-<li><a href="./commons-lang-2.3-sources.jar.sha1">commons-lang-2.3-sources.jar.sha1</li>
-<li><a href="./commons-lang-2.3.jar">commons-lang-2.3.jar</li>
-<li><a href="./commons-lang-2.3.jar.asc">commons-lang-2.3.jar.asc</li>
-<li><a href="./commons-lang-2.3.jar.md5">commons-lang-2.3.jar.md5</li>
-<li><a href="./commons-lang-2.3.jar.sha1">commons-lang-2.3.jar.sha1</li>
-<li><a href="./commons-lang-2.3.pom">commons-lang-2.3.pom</li>
-<li><a href="./commons-lang-2.3.pom.md5">commons-lang-2.3.pom.md5</li>
-<li><a href="./commons-lang-2.3.pom.sha1">commons-lang-2.3.pom.sha1</li>
-<li><a href="./maven-metadata.xml">maven-metadata.xml</li>
-<li><a href="./maven-metadata.xml.md5">maven-metadata.xml.md5</li>
-<li><a href="./maven-metadata.xml.sha1">maven-metadata.xml.sha1</li>
-</ul>
-</body>
-</html>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/ibiblio-wagon.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/ibiblio-wagon.html
deleted file mode 100644
index 618bfa1..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/ibiblio-wagon.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
- <HEAD>
- <TITLE>Index of /maven2/org/apache/maven/wagon</TITLE>
- </HEAD>
- <BODY>
-<H1>Index of /maven2/org/apache/maven/wagon</H1>
-<PRE><IMG SRC="/icons/blank.gif" ALT=" "> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A> <A HREF="?S=A">Size</A> <A HREF="?D=A">Description</A>
-
-<HR>
-<IMG SRC="/icons/back.gif" ALT="[DIR]"> <A HREF="/maven2/org/apache/maven/">Parent Directory</A> 09-May-2006 10:57 -
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-2.pom">wagon-1.0-alpha-2.pom</A> 07-May-2006 18:31 3k
-<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="wagon-1.0-alpha-2.pom.asc">wagon-1.0-alpha-2.pom.asc</A> 07-May-2006 18:31 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-2.pom.md5">wagon-1.0-alpha-2.pom.md5</A> 07-May-2006 18:31 1k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-2.pom.sha1">wagon-1.0-alpha-2.pom.sha1</A> 07-May-2006 18:31 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050413.021234-4.pom">wagon-1.0-alpha-3-20050413.021234-4.pom</A> 08-Nov-2005 17:25 3k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050413.021234-4.pom.md5">wagon-1.0-alpha-3-20050413.021234-4.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050413.021234-4.pom.sha1">wagon-1.0-alpha-3-20050413.021234-4.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050419.043745-5.pom">wagon-1.0-alpha-3-20050419.043745-5.pom</A> 08-Nov-2005 17:25 3k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050419.043745-5.pom.md5">wagon-1.0-alpha-3-20050419.043745-5.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050419.043745-5.pom.sha1">wagon-1.0-alpha-3-20050419.043745-5.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050419.044035-6.pom">wagon-1.0-alpha-3-20050419.044035-6.pom</A> 08-Nov-2005 17:25 3k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050419.044035-6.pom.md5">wagon-1.0-alpha-3-20050419.044035-6.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050419.044035-6.pom.sha1">wagon-1.0-alpha-3-20050419.044035-6.pom.sha1</A> 10-May-2006 00:11 1k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050421.162738-7.pom">wagon-1.0-alpha-3-20050421.162738-7.pom</A> 08-Nov-2005 17:25 3k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050421.162738-7.pom.md5">wagon-1.0-alpha-3-20050421.162738-7.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050421.162738-7.pom.sha1">wagon-1.0-alpha-3-20050421.162738-7.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050422.075233-8.pom">wagon-1.0-alpha-3-20050422.075233-8.pom</A> 08-Nov-2005 17:25 3k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050422.075233-8.pom.md5">wagon-1.0-alpha-3-20050422.075233-8.pom.md5</A> 10-May-2006 00:11 1k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050422.075233-8.pom.sha1">wagon-1.0-alpha-3-20050422.075233-8.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050429.051847-9.pom">wagon-1.0-alpha-3-20050429.051847-9.pom</A> 08-Nov-2005 17:25 3k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050429.051847-9.pom.md5">wagon-1.0-alpha-3-20050429.051847-9.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-1.0-alpha-3-20050429.051847-9.pom.sha1">wagon-1.0-alpha-3-20050429.051847-9.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-file/">wagon-file/</A> 19-Jun-2006 08:27 -
-
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-ftp/">wagon-ftp/</A> 19-Jun-2006 08:28 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-http-lightweight/">wagon-http-lightweight/</A> 19-Jun-2006 08:30 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-http/">wagon-http/</A> 19-Jun-2006 08:32 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-lightweight-http/">wagon-lightweight-http/</A> 07-May-2006 18:31 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-provider-api/">wagon-provider-api/</A> 19-Jun-2006 08:20 -
-
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-provider-test/">wagon-provider-test/</A> 19-Jun-2006 08:25 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-provider/">wagon-provider/</A> 13-May-2006 04:11 -
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-2.pom">wagon-providers-1.0-alpha-2.pom</A> 07-May-2006 18:31 1k
-<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="wagon-providers-1.0-alpha-2.pom.asc">wagon-providers-1.0-alpha-2.pom.asc</A> 07-May-2006 18:31 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-2.pom.md5">wagon-providers-1.0-alpha-2.pom.md5</A> 07-May-2006 18:31 1k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-2.pom.sha1">wagon-providers-1.0-alpha-2.pom.sha1</A> 07-May-2006 18:31 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050407.202848-1.pom">wagon-providers-1.0-alpha-3-20050407.202848-1.pom</A> 08-Nov-2005 17:25 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5">wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1">wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050419.044035-2.pom">wagon-providers-1.0-alpha-3-20050419.044035-2.pom</A> 08-Nov-2005 17:25 1k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5">wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1">wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050421.162738-3.pom">wagon-providers-1.0-alpha-3-20050421.162738-3.pom</A> 08-Nov-2005 17:25 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5">wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1">wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1</A> 10-May-2006 00:11 1k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050422.075233-4.pom">wagon-providers-1.0-alpha-3-20050422.075233-4.pom</A> 08-Nov-2005 17:25 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5">wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1">wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050429.051847-5.pom">wagon-providers-1.0-alpha-3-20050429.051847-5.pom</A> 08-Nov-2005 17:25 1k
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5">wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5</A> 10-May-2006 00:11 1k
-
-<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1">wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1</A> 10-May-2006 00:11 1k
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-providers/">wagon-providers/</A> 19-Jun-2006 08:26 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-scm/">wagon-scm/</A> 07-May-2006 19:40 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-ssh-external/">wagon-ssh-external/</A> 19-Jun-2006 08:34 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-ssh/">wagon-ssh/</A> 19-Jun-2006 08:35 -
-
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon-webdav/">wagon-webdav/</A> 19-Jun-2006 08:38 -
-<IMG SRC="/icons/folder.gif" ALT="[DIR]"> <A HREF="wagon/">wagon/</A> 19-Jun-2006 08:17 -
-</PRE><HR>
-<ADDRESS>Apache/1.3.33 Server at www.ibiblio.org Port 80</ADDRESS>
-</BODY></HTML>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/jetty-wagon.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/jetty-wagon.html
deleted file mode 100644
index 45187e4..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/jetty-wagon.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<HTML><HEAD><TITLE>Directory: /maven2/</TITLE></HEAD><BODY>
-<H1>Directory: /maven2/</H1><TABLE BORDER=0><TR><TD><A HREF=/maven2/org/apache/maven/wagon/../>Parent Directory</A></TD><TD></TD><TD></TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-2.pom">wagon-1.0-alpha-2.pom </TD><TD ALIGN=right>3k </TD><TD>07-May-2006 18:31</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-2.pom.asc">wagon-1.0-alpha-2.pom.asc </TD><TD ALIGN=right>1k </TD><TD>07-May-2006 18:31</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-2.pom.md5">wagon-1.0-alpha-2.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>07-May-2006 18:31</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-2.pom.sha1">wagon-1.0-alpha-2.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>07-May-2006 18:31</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050413.021234-4.pom">wagon-1.0-alpha-3-20050413.021234-4.pom </TD><TD ALIGN=right>3k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050413.021234-4.pom.md5">wagon-1.0-alpha-3-20050413.021234-4.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050413.021234-4.pom.sha1">wagon-1.0-alpha-3-20050413.021234-4.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050419.043745-5.pom">wagon-1.0-alpha-3-20050419.043745-5.pom </TD><TD ALIGN=right>3k </TD><TD>08-Nov-2005 17:25</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050419.043745-5.pom.md5">wagon-1.0-alpha-3-20050419.043745-5.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050419.043745-5.pom.sha1">wagon-1.0-alpha-3-20050419.043745-5.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050419.044035-6.pom">wagon-1.0-alpha-3-20050419.044035-6.pom </TD><TD ALIGN=right>3k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050419.044035-6.pom.md5">wagon-1.0-alpha-3-20050419.044035-6.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050419.044035-6.pom.sha1">wagon-1.0-alpha-3-20050419.044035-6.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050421.162738-7.pom">wagon-1.0-alpha-3-20050421.162738-7.pom </TD><TD ALIGN=right>3k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050421.162738-7.pom.md5">wagon-1.0-alpha-3-20050421.162738-7.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050421.162738-7.pom.sha1">wagon-1.0-alpha-3-20050421.162738-7.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050422.075233-8.pom">wagon-1.0-alpha-3-20050422.075233-8.pom </TD><TD ALIGN=right>3k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050422.075233-8.pom.md5">wagon-1.0-alpha-3-20050422.075233-8.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050422.075233-8.pom.sha1">wagon-1.0-alpha-3-20050422.075233-8.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050429.051847-9.pom">wagon-1.0-alpha-3-20050429.051847-9.pom </TD><TD ALIGN=right>3k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050429.051847-9.pom.md5">wagon-1.0-alpha-3-20050429.051847-9.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-1.0-alpha-3-20050429.051847-9.pom.sha1">wagon-1.0-alpha-3-20050429.051847-9.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-file/">wagon-file/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:27</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-ftp/">wagon-ftp/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:28</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-http-lightweight/">wagon-http-lightweight/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:30</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-http/">wagon-http/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:32</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-lightweight-http/">wagon-lightweight-http/ </TD><TD ALIGN=right>- </TD><TD>07-May-2006 18:31</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-provider-api/">wagon-provider-api/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:20</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-provider-test/">wagon-provider-test/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-provider/">wagon-provider/ </TD><TD ALIGN=right>- </TD><TD>13-May-2006 04:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-2.pom">wagon-providers-1.0-alpha-2.pom </TD><TD ALIGN=right>1k </TD><TD>07-May-2006 18:31</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-2.pom.asc">wagon-providers-1.0-alpha-2.pom.asc </TD><TD ALIGN=right>1k </TD><TD>07-May-2006 18:31</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-2.pom.md5">wagon-providers-1.0-alpha-2.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>07-May-2006 18:31</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-2.pom.sha1">wagon-providers-1.0-alpha-2.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>07-May-2006 18:31</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050407.202848-1.pom">wagon-providers-1.0-alpha-3-20050407.202848-1.pom </TD><TD ALIGN=right>1k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5">wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1">wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050419.044035-2.pom">wagon-providers-1.0-alpha-3-20050419.044035-2.pom </TD><TD ALIGN=right>1k </TD><TD>08-Nov-2005 17:25</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5">wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1">wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050421.162738-3.pom">wagon-providers-1.0-alpha-3-20050421.162738-3.pom </TD><TD ALIGN=right>1k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5">wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1">wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050422.075233-4.pom">wagon-providers-1.0-alpha-3-20050422.075233-4.pom </TD><TD ALIGN=right>1k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5">wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1">wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050429.051847-5.pom">wagon-providers-1.0-alpha-3-20050429.051847-5.pom </TD><TD ALIGN=right>1k </TD><TD>08-Nov-2005 17:25</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5">wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1">wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1 </TD><TD ALIGN=right>1k </TD><TD>10-May-2006 00:11</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-providers/">wagon-providers/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:26</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-scm/">wagon-scm/ </TD><TD ALIGN=right>- </TD><TD>07-May-2006 19:40</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-ssh-external/">wagon-ssh-external/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:34</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-ssh/">wagon-ssh/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:35</TD></TR>
-
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon-webdav/">wagon-webdav/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:38</TD></TR>
-<TR><TD><A HREF="/maven2/org/apache/maven/wagon/wagon/">wagon/ </TD><TD ALIGN=right>- </TD><TD>19-Jun-2006 08:17</TD></TR>
-
-
-</TABLE>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/mevenide.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/mevenide.html
deleted file mode 100644
index 9d09cfb..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/mevenide.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
- <head>
- <title>Index of /org/codehaus/mevenide</title>
- </head>
- <body>
-<h1>Index of /org/codehaus/mevenide</h1>
-<pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/back.gif" alt="[DIR]"> <a href="/org/codehaus/">Parent Directory</a> -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="apisupport/">apisupport/</a> 22-Jan-2008 03:01 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="autoupdate/">autoupdate/</a> 22-Jan-2008 02:57 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="continuum-rpc/">continuum-rpc/</a> 09-Aug-2006 12:41 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="continuum/">continuum/</a> 09-Aug-2006 12:41 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="debugger-bridge/">debugger-bridge/</a> 22-Jan-2008 02:53 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="deployment-bridge/">deployment-bridge/</a> 22-Jan-2008 02:55 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="feature/">feature/</a> 22-Jan-2008 03:01 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="grammar/">grammar/</a> 22-Jan-2008 02:55 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="ide-mojos/">ide-mojos/</a> 31-Aug-2007 06:04 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="indexer/">indexer/</a> 22-Jan-2008 02:54 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="j2ee/">j2ee/</a> 22-Jan-2008 02:56 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="junit/">junit/</a> 22-Jan-2008 03:02 -
-<img src="/icons/text.gif" alt="[TXT]"> <a href="maven-metadata.xml">maven-metadata.xml</a> 22-Jan-2008 02:59 780
-<img src="/icons/text.gif" alt="[TXT]"> <a href="maven-metadata.xml.md5">maven-metadata.xml.md5</a> 22-Jan-2008 02:59 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="maven-metadata.xml.sha1">maven-metadata.xml.sha1</a> 22-Jan-2008 02:59 40
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="mevenide2-parent/">mevenide2-parent/</a> 18-Dec-2007 11:47 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="nb-mvn-embedder/">nb-mvn-embedder/</a> 22-Jan-2008 02:52 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="nb-project/">nb-project/</a> 22-Jan-2008 02:54 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="nb-repo-browser/">nb-repo-browser/</a> 24-Oct-2006 13:06 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="netbeans-debugger-plugin/">netbeans-debugger-plugin/</a> 31-Aug-2007 06:35 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="netbeans-deploy-plugin/">netbeans-deploy-plugin/</a> 31-Aug-2007 06:36 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="netbeans-libs/">netbeans-libs/</a> 22-Jan-2008 02:52 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="netbeans-nbmreload-plugin/">netbeans-nbmreload-plugin/</a> 31-Aug-2007 06:37 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="netbeans-repository/">netbeans-repository/</a> 22-Jan-2008 03:00 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="netbeans-run-plugin/">netbeans-run-plugin/</a> 31-Aug-2007 06:36 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="netbeans/">netbeans/</a> 22-Jan-2008 02:52 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="persistence/">persistence/</a> 22-Jan-2008 02:57 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="plugin-bridges/">plugin-bridges/</a> 22-Jan-2008 02:53 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="plugins/">plugins/</a> 17-May-2006 17:24 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="reload-nbm-bridge/">reload-nbm-bridge/</a> 22-Jan-2008 02:59 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="run-jar-bridge/">run-jar-bridge/</a> 22-Jan-2008 02:53 -
-<hr></pre>
-<address>Apache/2.0.52 (Red Hat) Server at repository.codehaus.org Port 80</address>
-</body></html>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/mirror-wagon.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/mirror-wagon.html
deleted file mode 100644
index 33da508..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/mirror-wagon.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>Index of /maven2/org/apache/maven/wagon/</title>
-<link rel="stylesheet" type="text/css" href="/css/mirror.css" />
-</head>
-<body>
-<h2>Index of /maven2/org/apache/maven/wagon/</h2>
-<div class="list">
-<table cellpadding="0" cellspacing="0">
-<thead><tr><th class="n">Name</th><th class="m">Last Modified</th><th class="s">Size</th><th class="t">Type</th></tr></thead>
-
-<tbody>
-<tr><td class="n"><a href="../">Parent Directory</a>/</td><td class="m"> </td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon/">wagon</a>/</td><td class="m">2006-Aug-04 20:01:55</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-file/">wagon-file</a>/</td><td class="m">2006-Aug-04 21:01:11</td><td class="s">- </td><td class="t">Directory</td></tr>
-
-<tr><td class="n"><a href="wagon-ftp/">wagon-ftp</a>/</td><td class="m">2006-Aug-04 21:01:11</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-http/">wagon-http</a>/</td><td class="m">2006-Aug-04 21:01:11</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-http-lightweight/">wagon-http-lightweight</a>/</td><td class="m">2006-Aug-04 21:01:11</td><td class="s">- </td><td class="t">Directory</td></tr>
-
-<tr><td class="n"><a href="wagon-lightweight-http/">wagon-lightweight-http</a>/</td><td class="m">2005-Nov-01 05:17:24</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-provider/">wagon-provider</a>/</td><td class="m">2006-Aug-04 20:01:55</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-provider-api/">wagon-provider-api</a>/</td><td class="m">2006-Aug-04 21:01:11</td><td class="s">- </td><td class="t">Directory</td></tr>
-
-<tr><td class="n"><a href="wagon-provider-test/">wagon-provider-test</a>/</td><td class="m">2006-Aug-04 21:01:11</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-providers/">wagon-providers</a>/</td><td class="m">2006-Aug-04 20:01:55</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-scm/">wagon-scm</a>/</td><td class="m">2006-Aug-04 20:01:55</td><td class="s">- </td><td class="t">Directory</td></tr>
-
-<tr><td class="n"><a href="wagon-ssh/">wagon-ssh</a>/</td><td class="m">2006-Aug-04 20:01:55</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-ssh-external/">wagon-ssh-external</a>/</td><td class="m">2006-Aug-04 20:01:55</td><td class="s">- </td><td class="t">Directory</td></tr>
-<tr><td class="n"><a href="wagon-webdav/">wagon-webdav</a>/</td><td class="m">2006-Aug-04 20:01:55</td><td class="s">- </td><td class="t">Directory</td></tr>
-
-<tr><td class="n"><a href="wagon-1.0-alpha-2.pom">wagon-1.0-alpha-2.pom</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">3.1K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-2.pom.asc">wagon-1.0-alpha-2.pom.asc</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-2.pom.md5">wagon-1.0-alpha-2.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-2.pom.sha1">wagon-1.0-alpha-2.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050413.021234-4.pom">wagon-1.0-alpha-3-20050413.021234-4.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">3.1K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050413.021234-4.pom.md5">wagon-1.0-alpha-3-20050413.021234-4.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050413.021234-4.pom.sha1">wagon-1.0-alpha-3-20050413.021234-4.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050419.043745-5.pom">wagon-1.0-alpha-3-20050419.043745-5.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">3.1K</td><td class="t">text/xml</td></tr>
-
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050419.043745-5.pom.md5">wagon-1.0-alpha-3-20050419.043745-5.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050419.043745-5.pom.sha1">wagon-1.0-alpha-3-20050419.043745-5.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050419.044035-6.pom">wagon-1.0-alpha-3-20050419.044035-6.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">3.1K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050419.044035-6.pom.md5">wagon-1.0-alpha-3-20050419.044035-6.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050419.044035-6.pom.sha1">wagon-1.0-alpha-3-20050419.044035-6.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050421.162738-7.pom">wagon-1.0-alpha-3-20050421.162738-7.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">3.1K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050421.162738-7.pom.md5">wagon-1.0-alpha-3-20050421.162738-7.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050421.162738-7.pom.sha1">wagon-1.0-alpha-3-20050421.162738-7.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050422.075233-8.pom">wagon-1.0-alpha-3-20050422.075233-8.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">3.1K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050422.075233-8.pom.md5">wagon-1.0-alpha-3-20050422.075233-8.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050422.075233-8.pom.sha1">wagon-1.0-alpha-3-20050422.075233-8.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050429.051847-9.pom">wagon-1.0-alpha-3-20050429.051847-9.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">3.1K</td><td class="t">text/xml</td></tr>
-
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050429.051847-9.pom.md5">wagon-1.0-alpha-3-20050429.051847-9.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-1.0-alpha-3-20050429.051847-9.pom.sha1">wagon-1.0-alpha-3-20050429.051847-9.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-2.pom">wagon-providers-1.0-alpha-2.pom</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.9K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-2.pom.asc">wagon-providers-1.0-alpha-2.pom.asc</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-2.pom.md5">wagon-providers-1.0-alpha-2.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-2.pom.sha1">wagon-providers-1.0-alpha-2.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050407.202848-1.pom">wagon-providers-1.0-alpha-3-20050407.202848-1.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">0.9K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5">wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1">wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050419.044035-2.pom">wagon-providers-1.0-alpha-3-20050419.044035-2.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">0.9K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5">wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1">wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050421.162738-3.pom">wagon-providers-1.0-alpha-3-20050421.162738-3.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">0.9K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5">wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1">wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050422.075233-4.pom">wagon-providers-1.0-alpha-3-20050422.075233-4.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">0.9K</td><td class="t">text/xml</td></tr>
-
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5">wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1">wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050429.051847-5.pom">wagon-providers-1.0-alpha-3-20050429.051847-5.pom</a></td><td class="m">2005-Nov-08 22:25:32</td><td class="s">1.0K</td><td class="t">text/xml</td></tr>
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5">wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-
-<tr><td class="n"><a href="wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1">wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1</a></td><td class="m">2006-Aug-04 21:01:11</td><td class="s">0.1K</td><td class="t">text/plain</td></tr>
-</tbody>
-</table>
-</div>
-<div class="foot"><br />ibiblio.org - Mirror Site<br />
-<a href="mailto:mirror.admin@mirror.com">Mirror Admin</a></div>
-
-</body>
-</html>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/nekohtml.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/nekohtml.html
deleted file mode 100644
index 1738029..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/nekohtml.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
- <head>
- <title>Index of /maven2/nekohtml/nekohtml/1.9.6</title>
- </head>
- <body>
-<h1>Index of /maven2/nekohtml/nekohtml/1.9.6</h1>
-<pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/back.gif" alt="[DIR]"> <a href="/maven2/nekohtml/nekohtml/">Parent Directory</a> -
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6-javadoc.jar">nekohtml-1.9.6-javadoc.jar</a> 02-Jan-2008 15:07 235K
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6-javadoc.jar.md5">nekohtml-1.9.6-javadoc.jar.md5</a> 17-Jan-2008 21:35 134
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6-javadoc.jar.sha1">nekohtml-1.9.6-javadoc.jar.sha1</a> 17-Jan-2008 21:35 142
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6-sources.jar">nekohtml-1.9.6-sources.jar</a> 17-Jan-2008 21:35 88K
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6-sources.jar.md5">nekohtml-1.9.6-sources.jar.md5</a> 17-Jan-2008 21:35 134
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6-sources.jar.sha1">nekohtml-1.9.6-sources.jar.sha1</a> 17-Jan-2008 21:35 142
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6.jar">nekohtml-1.9.6.jar</a> 02-Jan-2008 15:07 108K
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6.jar.md5">nekohtml-1.9.6.jar.md5</a> 17-Jan-2008 21:35 126
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="nekohtml-1.9.6.jar.sha1">nekohtml-1.9.6.jar.sha1</a> 17-Jan-2008 21:35 134
-<img src="/icons/text.gif" alt="[TXT]"> <a href="nekohtml-1.9.6.pom">nekohtml-1.9.6.pom</a> 02-Jan-2008 15:07 702
-<img src="/icons/text.gif" alt="[TXT]"> <a href="nekohtml-1.9.6.pom.md5">nekohtml-1.9.6.pom.md5</a> 17-Jan-2008 21:35 126
-<img src="/icons/text.gif" alt="[TXT]"> <a href="nekohtml-1.9.6.pom.sha1">nekohtml-1.9.6.pom.sha1</a> 17-Jan-2008 21:35 134
-<hr></pre>
-<address>Apache/2.0.52 (Red Hat) Server at repo1.maven.org Port 80</address>
-</body></html>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/net_sf.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/net_sf.html
deleted file mode 100644
index eb89c62..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/net_sf.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
- <head>
- <title>Index of /maven2/net/sf</title>
- </head>
- <body>
-<h1>Index of /maven2/net/sf</h1>
-<pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/back.gif" alt="[DIR]"> <a href="/maven2/net/">Parent Directory</a> -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="a2j/">a2j/</a> 28-Nov-2005 11:32 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="aislib/">aislib/</a> 10-Feb-2008 06:40 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="alchim/">alchim/</a> 22-Nov-2007 08:27 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="antenna/">antenna/</a> 09-Jul-2007 11:45 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="apt-jelly/">apt-jelly/</a> 02-Apr-2007 15:48 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="beanlib/">beanlib/</a> 20-Apr-2006 07:32 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="bluecove/">bluecove/</a> 25-Jan-2007 01:03 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="buildbox/">buildbox/</a> 13-Jan-2008 20:07 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="click/">click/</a> 10-Dec-2005 19:31 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="clirr/">clirr/</a> 11-Feb-2006 20:41 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="datavision/">datavision/</a> 26-Jan-2008 18:46 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="dozer/">dozer/</a> 09-Feb-2006 23:31 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="dtddoc/">dtddoc/</a> 03-Feb-2007 07:32 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="dynpageplus/">dynpageplus/</a> 03-Jan-2006 11:36 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="ehcache/">ehcache/</a> 04-May-2007 20:14 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="ezmorph/">ezmorph/</a> 17-Aug-2006 11:57 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="falcon/">falcon/</a> 31-Jan-2007 11:35 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="grester/">grester/</a> 22-Oct-2007 18:25 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="gwt-widget/">gwt-widget/</a> 17-Sep-2007 12:58 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="hermesftp/">hermesftp/</a> 14-Jun-2006 17:06 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="hibernate/">hibernate/</a> 31-Oct-2005 23:08 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jcharts/">jcharts/</a> 16-May-2007 17:26 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jdatabaseimport/">jdatabaseimport/</a> 20-Oct-2006 10:45 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jeceira/">jeceira/</a> 26-Jun-2007 16:50 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jfcunit/">jfcunit/</a> 07-Feb-2006 00:49 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jfig/">jfig/</a> 25-Jan-2007 01:03 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jguard/">jguard/</a> 31-Jul-2007 18:36 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jipcam/">jipcam/</a> 02-Mar-2006 15:32 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jlynx/">jlynx/</a> 02-Aug-2007 22:04 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jour/">jour/</a> 27-Aug-2007 20:09 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jpf/">jpf/</a> 26-Apr-2007 10:45 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="json-lib/">json-lib/</a> 11-Feb-2007 19:12 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jsptest/">jsptest/</a> 07-Aug-2007 16:17 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jsr107cache/">jsr107cache/</a> 25-Jan-2007 00:45 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jt400/">jt400/</a> 11-Nov-2005 15:31 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jxls/">jxls/</a> 29-Jul-2007 17:54 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="kxml/">kxml/</a> 19-Mar-2007 20:25 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="ldaptemplate/">ldaptemplate/</a> 27-Feb-2006 19:41 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="locale4j/">locale4j/</a> 31-Aug-2007 07:23 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="mapasuta/">mapasuta/</a> 12-Nov-2006 12:05 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="maven-har/">maven-har/</a> 24-Aug-2007 07:09 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="maven-sar/">maven-sar/</a> 28-Aug-2007 18:28 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="opencsv/">opencsv/</a> 14-Mar-2007 12:55 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="oval/">oval/</a> 15-Jan-2007 15:30 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="proguard/">proguard/</a> 19-Jan-2006 15:41 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="qdwizard/">qdwizard/</a> 19-Dec-2007 16:02 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="resultsetmapper/">resultsetmapper/</a> 18-Mar-2007 16:23 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="retrotranslator/">retrotranslator/</a> 26-Apr-2006 15:31 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="saxon/">saxon/</a> 04-Apr-2006 23:32 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="shadesdb/">shadesdb/</a> 19-Oct-2006 14:58 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="smc/">smc/</a> 30-May-2006 01:13 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="speculoos/">speculoos/</a> 20-Nov-2006 17:04 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="springlayout/">springlayout/</a> 26-Mar-2007 15:24 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="stat-scm/">stat-scm/</a> 25-Apr-2007 10:56 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="statsvn/">statsvn/</a> 29-Nov-2006 13:55 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="stax/">stax/</a> 31-Oct-2005 23:08 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="struts/">struts/</a> 28-Nov-2005 11:32 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="tacos/">tacos/</a> 19-Dec-2007 04:16 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="testextensions/">testextensions/</a> 21-May-2007 12:54 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="webdav-servlet/">webdav-servlet/</a> 30-Jan-2006 19:36 -
-<hr></pre>
-<address>Apache/2.0.52 (Red Hat) Server at repo1.maven.org Port 80</address>
-</body></html>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/org.apache.maven.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/org.apache.maven.html
deleted file mode 100644
index fd674c8..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/org.apache.maven.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
- <head>
- <title>Index of /repo/m2-ibiblio-rsync-repository/org/apache/maven/archiva/archiva-plexus-runtime/1.0.1</title>
- </head>
- <body>
-<h1>Index of /repo/m2-ibiblio-rsync-repository/org/apache/maven/archiva/archiva-plexus-runtime/1.0.1</h1>
-<pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/back.gif" alt="[DIR]"> <a href="/repo/m2-ibiblio-rsync-repository/org/apache/maven/archiva/archiva-plexus-runtime/">Parent Directory</a> -
-<img src="/icons/compressed.gif" alt="[ ]"> <a href="archiva-plexus-runtime-1.0.1-bin.tar.gz">archiva-plexus-runtime-1.0.1-bin.tar.gz</a> 04-Feb-2008 03:40 22M
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.tar.gz.asc">archiva-plexus-runtime-1.0.1-bin.tar.gz.asc</a> 04-Feb-2008 03:40 189
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.md5">archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.sha1">archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.tar.gz.md5">archiva-plexus-runtime-1.0.1-bin.tar.gz.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.tar.gz.sha1">archiva-plexus-runtime-1.0.1-bin.tar.gz.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/compressed.gif" alt="[ ]"> <a href="archiva-plexus-runtime-1.0.1-bin.zip">archiva-plexus-runtime-1.0.1-bin.zip</a> 04-Feb-2008 03:40 23M
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.zip.asc">archiva-plexus-runtime-1.0.1-bin.zip.asc</a> 04-Feb-2008 03:40 189
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.zip.asc.md5">archiva-plexus-runtime-1.0.1-bin.zip.asc.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.zip.asc.sha1">archiva-plexus-runtime-1.0.1-bin.zip.asc.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.zip.md5">archiva-plexus-runtime-1.0.1-bin.zip.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-bin.zip.sha1">archiva-plexus-runtime-1.0.1-bin.zip.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="archiva-plexus-runtime-1.0.1-sources.jar">archiva-plexus-runtime-1.0.1-sources.jar</a> 04-Feb-2008 03:40 5.4K
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-sources.jar.asc">archiva-plexus-runtime-1.0.1-sources.jar.asc</a> 04-Feb-2008 03:40 189
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-sources.jar.asc.md5">archiva-plexus-runtime-1.0.1-sources.jar.asc.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-sources.jar.asc.sha1">archiva-plexus-runtime-1.0.1-sources.jar.asc.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-sources.jar.md5">archiva-plexus-runtime-1.0.1-sources.jar.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1-sources.jar.sha1">archiva-plexus-runtime-1.0.1-sources.jar.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="archiva-plexus-runtime-1.0.1.jar">archiva-plexus-runtime-1.0.1.jar</a> 04-Feb-2008 03:40 8.0K
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.jar.asc">archiva-plexus-runtime-1.0.1.jar.asc</a> 04-Feb-2008 03:40 189
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.jar.asc.md5">archiva-plexus-runtime-1.0.1.jar.asc.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.jar.asc.sha1">archiva-plexus-runtime-1.0.1.jar.asc.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.jar.md5">archiva-plexus-runtime-1.0.1.jar.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.jar.sha1">archiva-plexus-runtime-1.0.1.jar.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/unknown.gif" alt="[ ]"> <a href="archiva-plexus-runtime-1.0.1.pom">archiva-plexus-runtime-1.0.1.pom</a> 04-Feb-2008 03:40 6.6K
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.pom.asc">archiva-plexus-runtime-1.0.1.pom.asc</a> 04-Feb-2008 03:40 189
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.pom.asc.md5">archiva-plexus-runtime-1.0.1.pom.asc.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.pom.asc.sha1">archiva-plexus-runtime-1.0.1.pom.asc.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.pom.md5">archiva-plexus-runtime-1.0.1.pom.md5</a> 04-Feb-2008 03:40 32
-<img src="/icons/text.gif" alt="[TXT]"> <a href="archiva-plexus-runtime-1.0.1.pom.sha1">archiva-plexus-runtime-1.0.1.pom.sha1</a> 04-Feb-2008 03:40 40
-<img src="/icons/text.gif" alt="[TXT]"> <a href="readme%20artifacts.txt">readme artifacts.txt</a> 04-Feb-2008 03:40 40
-<hr></pre>
-<address>Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.7e-p1 Server at people.apache.org Port 80</address>
-</body></html>
diff --git a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/org.codehaus.html b/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/org.codehaus.html
deleted file mode 100644
index 57c3439..0000000
--- a/wagon-providers/wagon-http-shared4/src/test/resources/filelistings/org.codehaus.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
- <head>
- <title>Index of /org/codehaus</title>
- </head>
- <body>
-<h1>Index of /org/codehaus</h1>
-<pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/back.gif" alt="[DIR]"> <a href="/org/">Parent Directory</a> -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="agilifier/">agilifier/</a> 05-Oct-2006 16:06 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="benji/">benji/</a> 26-Jan-2008 20:04 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="bruce/">bruce/</a> 26-Jun-2007 07:31 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="btm/">btm/</a> 10-Apr-2007 07:08 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="cargo/">cargo/</a> 15-Mar-2007 15:41 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="castor-spring/">castor-spring/</a> 17-Jan-2007 21:49 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="castor/">castor/</a> 04-Feb-2008 16:28 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="cozmos/">cozmos/</a> 18-Dec-2006 12:51 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="dataforge/">dataforge/</a> 12-Jun-2006 21:38 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="dimple/">dimple/</a> 13-Dec-2006 04:59 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="droolsdotnet/">droolsdotnet/</a> 21-Feb-2007 22:50 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="enunciate/">enunciate/</a> 07-Jan-2008 09:37 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="fabric3/">fabric3/</a> 25-Jan-2008 04:55 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="gant/">gant/</a> 08-Dec-2007 03:41 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="grails-plugins/">grails-plugins/</a> 17-Jan-2007 21:43 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="groovy/">groovy/</a> 15-Dec-2007 12:15 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="gsoc/">gsoc/</a> 16-Feb-2007 15:48 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="guessencoding/">guessencoding/</a> 22-Jul-2007 16:13 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="gumtree/">gumtree/</a> 18-Jan-2007 17:54 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="gwt-openlayers/">gwt-openlayers/</a> 14-Sep-2007 17:04 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="haus/">haus/</a> 16-Mar-2007 15:46 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="izpack/">izpack/</a> 04-Feb-2008 05:42 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="javasim/">javasim/</a> 22-Sep-2007 22:02 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jedi/">jedi/</a> 01-Jun-2007 07:10 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jequel/">jequel/</a> 09-Nov-2007 08:18 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jet/">jet/</a> 22-Aug-2006 13:25 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jettison/">jettison/</a> 09-Nov-2006 04:13 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jfdi/">jfdi/</a> 15-Sep-2006 21:24 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jikesrvm/">jikesrvm/</a> 19-Jan-2007 23:07 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jra/">jra/</a> 23-Oct-2006 13:13 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jremoting/">jremoting/</a> 08-Jan-2008 10:47 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jtestme/">jtestme/</a> 01-Sep-2007 17:20 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="jtestr/">jtestr/</a> 07-Dec-2007 18:05 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="labs-ng/">labs-ng/</a> 20-Dec-2007 09:46 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="logicabyss/">logicabyss/</a> 02-Dec-2007 15:57 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="marionette/">marionette/</a> 08-Oct-2007 15:31 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="mevenide/">mevenide/</a> 18-Dec-2007 12:01 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="modello/">modello/</a> 22-Mar-2007 23:52 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="mojo/">mojo/</a> 06-Feb-2008 16:17 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="mvel/">mvel/</a> 05-Feb-2008 08:37 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="mvflex/">mvflex/</a> 29-Dec-2006 20:33 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="native-mojo/">native-mojo/</a> 12-Feb-2007 18:35 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="openim/">openim/</a> 30-Apr-2007 15:47 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="plexus/">plexus/</a> 06-Dec-2007 15:34 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="polymap/">polymap/</a> 02-Dec-2007 15:32 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="prometheus/">prometheus/</a> 28-Mar-2007 10:05 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="prophit/">prophit/</a> 30-Apr-2007 15:44 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="quaere/">quaere/</a> 19-Sep-2007 07:08 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="redback/">redback/</a> 07-Sep-2007 18:57 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="rulessandpit/">rulessandpit/</a> 02-May-2007 16:03 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="rvm/">rvm/</a> 19-Jan-2007 23:13 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="savana/">savana/</a> 09-Nov-2007 07:56 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="scala-ide/">scala-ide/</a> 26-Jun-2007 07:38 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="senro/">senro/</a> 27-Sep-2006 16:22 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="sonar/">sonar/</a> 24-Jan-2008 08:17 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="staxmate/">staxmate/</a> 27-Nov-2007 00:46 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="stomp/">stomp/</a> 02-Mar-2007 10:29 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="svn4j/">svn4j/</a> 17-Nov-2006 12:17 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="swiby/">swiby/</a> 19-Sep-2007 06:09 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="swizzle/">swizzle/</a> 04-Jan-2008 21:04 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="sxc/">sxc/</a> 16-Feb-2007 15:46 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="testdox/">testdox/</a> 12-Jul-2007 07:38 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="wadi/">wadi/</a> 21-Jul-2007 02:03 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="waffle/">waffle/</a> 06-Jan-2008 23:53 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="woodstox/">woodstox/</a> 03-Sep-2006 19:14 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="xdoclet/">xdoclet/</a> 15-Jun-2006 05:04 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="xfire/">xfire/</a> 19-Jun-2006 10:15 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="xharness/">xharness/</a> 24-Oct-2006 15:49 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="xsite/">xsite/</a> 11-Nov-2006 06:08 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="xstream/">xstream/</a> 28-Jul-2006 04:30 -
-<img src="/icons/folder.gif" alt="[DIR]"> <a href="xwire/">xwire/</a> 26-Jul-2006 14:20 -
-<hr></pre>
-<address>Apache/2.0.52 (Red Hat) Server at repository.codehaus.org Port 80</address>
-</body></html>
diff --git a/wagon-providers/wagon-http/pom.xml b/wagon-providers/wagon-http/pom.xml
index 66847e4..8626a80 100644
--- a/wagon-providers/wagon-http/pom.xml
+++ b/wagon-providers/wagon-http/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -36,21 +36,11 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>wagon-http-shared4</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <!-- used fo the TCK -->
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-tck-http</artifactId>
+ <artifactId>wagon-http-shared</artifactId>
<version>${project.version}</version>
- <scope>test</scope>
</dependency>
-
</dependencies>
-
- <!-- I believe we can shade this in Maven itself
+ <!-- I believe we can shade this in Maven itself
<build>
<plugins>
<plugin>
diff --git a/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java b/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
index 3606e4f..5556713 100644
--- a/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
+++ b/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
@@ -23,10 +23,8 @@
import java.io.InputStream;
import java.util.List;
-import org.apache.http.HttpException;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.client.methods.HttpGet;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.TransferFailedException;
import org.apache.maven.wagon.authorization.AuthorizationException;
@@ -50,13 +48,11 @@
String url = getRepository().getUrl() + "/" + destinationDirectory;
- HttpGet getMethod = new HttpGet( url );
+ GetMethod getMethod = new GetMethod( url );
try
{
-
- HttpResponse response = execute( getMethod );
- int statusCode = response.getStatusLine().getStatusCode();
+ int statusCode = execute( getMethod );
fireTransferDebug( url + " - Status code: " + statusCode );
@@ -87,7 +83,9 @@
"Failed to transfer file: " + url + ". Return code is: " + statusCode );
}
- InputStream is = response.getEntity().getContent();
+ InputStream is = null;
+
+ is = getMethod.getResponseBodyAsStream();
return HtmlFileListParser.parseFileList( url, is );
}
@@ -95,12 +93,9 @@
{
throw new TransferFailedException( "Could not read response body.", e );
}
- catch (HttpException e) {
- throw new TransferFailedException( "Could not read response body.", e );
- }
finally
{
- getMethod.abort();
+ getMethod.releaseConnection();
}
}
}
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java
index 83dcb76..e520bcf 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java
@@ -19,12 +19,10 @@
* under the License.
*/
+import java.util.Properties;
+
import org.apache.maven.wagon.StreamingWagon;
import org.apache.maven.wagon.http.HttpWagonTestCase;
-import org.apache.maven.wagon.shared.http.HttpConfiguration;
-import org.apache.maven.wagon.shared.http.HttpMethodConfiguration;
-
-import java.util.Properties;
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
@@ -40,21 +38,11 @@
protected String getTestRepositoryUrl()
{
- return getProtocol() + "://localhost:" + getTestRepositoryPort();
- }
-
- @Override
- protected int getTestRepositoryPort() {
- return 10009;
+ return getProtocol() + "://localhost:10007";
}
protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
{
- HttpConfiguration config = new HttpConfiguration();
-
- HttpMethodConfiguration methodConfiguration = new HttpMethodConfiguration();
- methodConfiguration.setHeaders( properties );
- config.setAll( methodConfiguration );
- ((HttpWagon) wagon).setHttpConfiguration( config );
+ ( (HttpWagon) wagon ).setHttpHeaders( properties );
}
}
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/TckTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/TckTest.java
deleted file mode 100644
index 512c157..0000000
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/TckTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.apache.maven.wagon.providers.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.wagon.tck.http.GetWagonTests;
-import org.apache.maven.wagon.tck.http.HttpWagonTests;
-import org.apache.maven.wagon.tck.http.HttpsGetWagonTests;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * This test will runn the TCK suite on wagon-http-lightweight
- */
-@RunWith( Suite.class )
-@Suite.SuiteClasses( { GetWagonTests.class, HttpsGetWagonTests.class } )
-public class TckTest
-{
- @BeforeClass
- public static void setup()
- {
- HttpWagonTests.setDefaultPort(9083);
- }
-
-}
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/WaitForeverServlet.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/WaitForeverServlet.java
index 4dc332d..d6c211f 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/WaitForeverServlet.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/WaitForeverServlet.java
@@ -18,15 +18,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
+
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
+import javax.servlet.ServletException;
+import java.io.IOException;
/**
* User: jdumay
@@ -34,13 +31,10 @@
* Time: 17:25:27
*/
public class WaitForeverServlet extends HttpServlet {
-
- private static Logger logger = Logger.getLogger( WaitForeverServlet.class );
-
public void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
- logger.info( "Calling WaitForeverServlet" );
+ System.out.println( "Calling WaitForeverServlet" );
try
{
Thread.sleep( 2000 );
diff --git a/wagon-providers/wagon-http/src/test/resources/META-INF/plexus/components.xml b/wagon-providers/wagon-http/src/test/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 8c4cc2f..0000000
--- a/wagon-providers/wagon-http/src/test/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<component-set>
- <components>
- <component>
- <role>org.apache.maven.wagon.tck.http.WagonTestCaseConfigurator</role>
- <implementation>org.apache.maven.wagon.tck.http.WagonTestCaseConfigurator</implementation>
- <configuration>
- <wagonHint>http</wagonHint>
- <useCaseConfigs>
- <highLatencyLowTimeout>
- <unsupported/>
- </highLatencyLowTimeout>
- <inifiniteLatencyTimeout>
- <unsupported/>
- </inifiniteLatencyTimeout>
- </useCaseConfigs>
- </configuration>
- </component>
- </components>
-</component-set>
diff --git a/wagon-providers/wagon-scm/pom.xml b/wagon-providers/wagon-scm/pom.xml
index 19914e9..98100ba 100644
--- a/wagon-providers/wagon-scm/pom.xml
+++ b/wagon-providers/wagon-scm/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -33,38 +33,34 @@
Wagon that gets and puts artifacts using a Source Control Management system
</description>
- <properties>
- <maven.scm.version>1.0</maven.scm.version>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
- <version>${maven.scm.version}</version>
+ <version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-manager-plexus</artifactId>
- <version>${maven.scm.version}</version>
+ <version>1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-test</artifactId>
- <version>${maven.scm.version}</version>
+ <version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-cvsexe</artifactId>
- <version>${maven.scm.version}</version>
+ <version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-svnexe</artifactId>
- <version>${maven.scm.version}</version>
+ <version>1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java b/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java
index ea356e5..874a931 100644
--- a/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java
+++ b/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java
@@ -19,15 +19,6 @@
* under the License.
*/
-import java.io.File;
-import java.io.IOException;
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import java.util.Stack;
-
import org.apache.maven.scm.ScmException;
import org.apache.maven.scm.ScmFile;
import org.apache.maven.scm.ScmFileSet;
@@ -50,10 +41,18 @@
import org.apache.maven.wagon.authorization.AuthorizationException;
import org.apache.maven.wagon.events.TransferEvent;
import org.apache.maven.wagon.resource.Resource;
-
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;
+import java.io.File;
+import java.io.IOException;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+import java.util.Stack;
+
/**
* Wagon provider to get and put files from and to SCM systems, using Maven-SCM as underlying transport.
* <p/>
@@ -649,6 +648,7 @@
{
ScmFile f = (ScmFile) it.next();
files.add( f.getPath() );
+ System.out.println( "LIST FILE: " + f + " (path=" + f.getPath() + ")" );
}
return files;
diff --git a/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/AbstractScmWagonTest.java b/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/AbstractScmWagonTest.java
index e0951c4..cacf209 100644
--- a/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/AbstractScmWagonTest.java
+++ b/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/AbstractScmWagonTest.java
@@ -19,6 +19,10 @@
* under the License.
*/
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
import org.apache.maven.scm.manager.plexus.DefaultScmManager;
import org.apache.maven.scm.provider.ScmProvider;
import org.apache.maven.wagon.FileTestUtils;
@@ -32,10 +36,6 @@
import org.apache.maven.wagon.resource.Resource;
import org.codehaus.plexus.util.FileUtils;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
/**
* Test for {@link ScmWagon}. You need a subclass for each SCM provider you want to test.
*
@@ -90,11 +90,6 @@
return null;
}
- @Override
- protected int getTestRepositoryPort() {
- return 0; // not used
- }
-
protected Wagon getWagon()
throws Exception
{
diff --git a/wagon-providers/wagon-ssh-common-test/pom.xml b/wagon-providers/wagon-ssh-common-test/pom.xml
index b5b4dea..17bf48a 100644
--- a/wagon-providers/wagon-ssh-common-test/pom.xml
+++ b/wagon-providers/wagon-ssh-common-test/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -47,6 +47,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <version>3.8.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
diff --git a/wagon-providers/wagon-ssh-common/pom.xml b/wagon-providers/wagon-ssh-common/pom.xml
index 58fd5b5..2ce7a6b 100644
--- a/wagon-providers/wagon-ssh-common/pom.xml
+++ b/wagon-providers/wagon-ssh-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/wagon-providers/wagon-ssh-common/src/main/java/org/apache/maven/wagon/providers/ssh/CommandExecutorStreamProcessor.java b/wagon-providers/wagon-ssh-common/src/main/java/org/apache/maven/wagon/providers/ssh/CommandExecutorStreamProcessor.java
index 71273ba..f245c64 100644
--- a/wagon-providers/wagon-ssh-common/src/main/java/org/apache/maven/wagon/providers/ssh/CommandExecutorStreamProcessor.java
+++ b/wagon-providers/wagon-ssh-common/src/main/java/org/apache/maven/wagon/providers/ssh/CommandExecutorStreamProcessor.java
@@ -19,6 +19,7 @@
* under the License.
*/
+import org.apache.maven.wagon.CommandExecutionException;
import org.apache.maven.wagon.Streams;
import java.io.BufferedReader;
@@ -38,7 +39,7 @@
}
public static Streams processStreams( BufferedReader stderrReader, BufferedReader stdoutReader )
- throws IOException
+ throws IOException, CommandExecutionException
{
Streams streams = new Streams();
diff --git a/wagon-providers/wagon-ssh-external/pom.xml b/wagon-providers/wagon-ssh-external/pom.xml
index deb955e..ec2ea72 100644
--- a/wagon-providers/wagon-ssh-external/pom.xml
+++ b/wagon-providers/wagon-ssh-external/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagonTest.java b/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagonTest.java
index 74c549a..6e6772f 100644
--- a/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagonTest.java
+++ b/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagonTest.java
@@ -55,12 +55,6 @@
return "scpexe";
}
- @Override
- protected int getTestRepositoryPort() {
- return 0; // not used
- }
-
-
public String getTestRepositoryUrl()
{
return TestData.getTestRepositoryUrl();
diff --git a/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpWagonWithSshPrivateKeySearchTest.java b/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpWagonWithSshPrivateKeySearchTest.java
index 9b8e674..de87f2e 100644
--- a/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpWagonWithSshPrivateKeySearchTest.java
+++ b/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpWagonWithSshPrivateKeySearchTest.java
@@ -53,12 +53,6 @@
return "scpexe";
}
- @Override
- protected int getTestRepositoryPort() {
- return 0; // not used
- }
-
-
public String getTestRepositoryUrl()
{
return TestData.getTestRepositoryUrl();
diff --git a/wagon-providers/wagon-ssh/pom.xml b/wagon-providers/wagon-ssh/pom.xml
index 1b08e78..4a748d3 100644
--- a/wagon-providers/wagon-ssh/pom.xml
+++ b/wagon-providers/wagon-ssh/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -52,6 +52,7 @@
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
+ <version>6.1.11</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonTest.java b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonTest.java
index 1db104f..558c6ce 100644
--- a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonTest.java
+++ b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonTest.java
@@ -19,14 +19,14 @@
* under the License.
*/
+import java.io.File;
+
import org.apache.maven.wagon.StreamingWagonTestCase;
import org.apache.maven.wagon.authentication.AuthenticationInfo;
import org.apache.maven.wagon.providers.ssh.TestData;
import org.apache.maven.wagon.repository.Repository;
import org.apache.maven.wagon.resource.Resource;
-import java.io.File;
-
/**
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id$
@@ -39,11 +39,6 @@
return "scp";
}
- @Override
- protected int getTestRepositoryPort() {
- return 0; // not used
- }
-
public String getTestRepositoryUrl()
{
return TestData.getTestRepositoryUrl();
diff --git a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonWithSshPrivateKeySearchTest.java b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonWithSshPrivateKeySearchTest.java
index 90c6a03..f2a9b68 100644
--- a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonWithSshPrivateKeySearchTest.java
+++ b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonWithSshPrivateKeySearchTest.java
@@ -42,11 +42,6 @@
return "scp";
}
- @Override
- protected int getTestRepositoryPort() {
- return 0; // not used
- }
-
public String getTestRepositoryUrl()
{
return TestData.getTestRepositoryUrl();
diff --git a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagonTest.java b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagonTest.java
index 0d17ade..229b868 100644
--- a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagonTest.java
+++ b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagonTest.java
@@ -19,14 +19,14 @@
* under the License.
*/
+import java.io.File;
+
import org.apache.maven.wagon.StreamingWagonTestCase;
import org.apache.maven.wagon.authentication.AuthenticationInfo;
import org.apache.maven.wagon.providers.ssh.TestData;
import org.apache.maven.wagon.repository.Repository;
import org.apache.maven.wagon.resource.Resource;
-import java.io.File;
-
/**
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @version $Id$
@@ -39,11 +39,6 @@
return "sftp";
}
- @Override
- protected int getTestRepositoryPort() {
- return 0; // not used
- }
-
public String getTestRepositoryUrl()
{
return TestData.getTestRepositoryUrl();
diff --git a/wagon-providers/wagon-webdav-jackrabbit/pom.xml b/wagon-providers/wagon-webdav-jackrabbit/pom.xml
index 4429f9c..ed0e727 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/pom.xml
+++ b/wagon-providers/wagon-webdav-jackrabbit/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-providers</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -48,12 +48,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>wagon-http-shared</artifactId>
- <version>${project.version}</version>
+ <version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-webdav</artifactId>
- <version>2.2.5</version>
+ <version>1.5.0</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
@@ -61,28 +61,18 @@
</exclusion>
</exclusions>
</dependency>
-
<dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- <!--
- The version of commons-logging that comes transitively has class loader
- problems. So we exclude it here and add a newer version below.
- -->
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-nop</artifactId>
+ <version>1.5.3</version>
+ <scope>runtime</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-servlet_2.5_spec</artifactId>
- <version>1.2</version>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.3</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -100,26 +90,16 @@
<artifactId>plexus-maven-plugin</artifactId>
<executions>
<execution>
- <id>generate</id>
- <configuration>
- <outputDirectory>${project.build.directory}/generated-resources/plexus/</outputDirectory>
- </configuration>
- <goals>
- <goal>descriptor</goal>
- </goals>
- </execution>
- <execution>
<id>merge-descriptors</id>
<configuration>
<descriptors>
- <descriptor>${basedir}/src/main/plexus/META-INF/plexus/components.xml</descriptor>
+ <descriptor>${basedir}/src/main/resources/META-INF/plexus/components.xml</descriptor>
<descriptor>${project.build.directory}/generated-resources/plexus/META-INF/plexus/components.xml</descriptor>
</descriptors>
</configuration>
<goals>
<goal>merge-descriptors</goal>
</goals>
- <phase>process-classes</phase>
</execution>
</executions>
<dependencies>
diff --git a/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java b/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
index 9fdcd57..f147848 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
+++ b/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
@@ -26,7 +26,6 @@
import java.util.List;
import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.jackrabbit.webdav.DavConstants;
import org.apache.jackrabbit.webdav.DavException;
@@ -102,7 +101,7 @@
* @throws HttpException
* @throws TransferFailedException
*/
- protected void mkdirs( String dir ) throws IOException
+ protected void mkdirs( String dir ) throws HttpException, IOException
{
Repository repository = getRepository();
String basedir = repository.getBasedir();
@@ -145,7 +144,7 @@
}
}
- private int doMkCol( String url ) throws IOException
+ private int doMkCol( String url ) throws HttpException, IOException
{
MkColMethod method = null;
try
diff --git a/wagon-providers/wagon-webdav-jackrabbit/src/main/plexus/META-INF/plexus/components.xml b/wagon-providers/wagon-webdav-jackrabbit/src/main/resources/META-INF/plexus/components.xml
similarity index 100%
rename from wagon-providers/wagon-webdav-jackrabbit/src/main/plexus/META-INF/plexus/components.xml
rename to wagon-providers/wagon-webdav-jackrabbit/src/main/resources/META-INF/plexus/components.xml
diff --git a/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java b/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
index 79c6998..03c8343 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
+++ b/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
@@ -16,6 +16,12 @@
*/
import it.could.webdav.DAVServlet;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.StreamingWagon;
import org.apache.maven.wagon.Wagon;
@@ -26,11 +32,6 @@
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
/*
* WebDAV Wagon Test
*
@@ -44,7 +45,7 @@
protected String getTestRepositoryUrl()
throws IOException
{
- return getProtocol() + "://localhost:" + getTestRepositoryPort() + "/newfolder/folder2";
+ return getProtocol() + "://localhost:10007/newfolder/folder2";
}
protected String getProtocol()
@@ -52,11 +53,6 @@
return "dav";
}
- @Override
- protected int getTestRepositoryPort() {
- return 10011;
- }
-
protected void createContext( Server server, File repositoryDirectory )
throws IOException
{
@@ -91,8 +87,7 @@
*/
public void testGetURLDavHttp()
{
- assertURL( "dav:http://localhost:" + getTestRepositoryPort() + "/dav/",
- "http://localhost:" + getTestRepositoryPort() + "/dav/" );
+ assertURL( "dav:http://localhost:10007/dav/", "http://localhost:10007/dav/" );
}
/**
@@ -100,8 +95,7 @@
*/
public void testGetURLDavHttps()
{
- assertURL( "dav:https://localhost:" + getTestRepositoryPort() + "/dav/",
- "https://localhost:" + getTestRepositoryPort() + "/dav/" );
+ assertURL( "dav:https://localhost:10007/dav/", "https://localhost:10007/dav/" );
}
/**
@@ -109,8 +103,7 @@
*/
public void testGetURLDavUri()
{
- assertURL( "dav://localhost:" + getTestRepositoryPort() + "/dav/",
- "http://localhost:" + getTestRepositoryPort() + "/dav/" );
+ assertURL( "dav://localhost:10007/dav/", "http://localhost:10007/dav/" );
}
/**
@@ -118,8 +111,7 @@
*/
public void testGetURLDavUriWithSsl()
{
- assertURL( "davs://localhost:" + getTestRepositoryPort() + "/dav/",
- "https://localhost:" + getTestRepositoryPort() + "/dav/" );
+ assertURL( "davs://localhost:10007/dav/", "https://localhost:10007/dav/" );
}
/**
@@ -127,8 +119,7 @@
*/
public void testGetURLDavPlusHttp()
{
- assertURL( "dav+https://localhost:" + getTestRepositoryPort() + "/dav/",
- "https://localhost:" + getTestRepositoryPort() + "/dav/" );
+ assertURL( "dav+https://localhost:10007/dav/", "https://localhost:10007/dav/" );
}
/**
@@ -136,8 +127,7 @@
*/
public void testGetURLDavPlusHttps()
{
- assertURL( "dav+https://localhost:" + getTestRepositoryPort() + "/dav/",
- "https://localhost:" + getTestRepositoryPort() + "/dav/" );
+ assertURL( "dav+https://localhost:10007/dav/", "https://localhost:10007/dav/" );
}
public void testMkdirs() throws Exception
diff --git a/wagon-tcks/pom.xml b/wagon-tcks/pom.xml
index 56e0776..2da34b4 100644
--- a/wagon-tcks/pom.xml
+++ b/wagon-tcks/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
diff --git a/wagon-tcks/wagon-tck-http/pom.xml b/wagon-tcks/wagon-tck-http/pom.xml
index 7db6d8b..85bf1fb 100644
--- a/wagon-tcks/wagon-tck-http/pom.xml
+++ b/wagon-tcks/wagon-tck-http/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-tcks</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -13,24 +13,33 @@
<name>Wagon HTTP Test Compatibility Kit</name>
<dependencies>
+ <!-- TODO: Split this out into a sample project that shows how to use this TCK. -->
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
+ <version>1.0-alpha-9-stable-1</version>
<!-- override test scope from parents -->
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <version>4.8.1</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
+ <version>6.1.21</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
- <version>${project.version}</version>
+ <version>1.0-beta-6</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
@@ -38,5 +47,19 @@
<version>1.4</version>
</dependency>
</dependencies>
-
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</project>
diff --git a/wagon-tcks/wagon-tck-http/sample-tck-consumer/pom.xml b/wagon-tcks/wagon-tck-http/sample-tck-consumer/pom.xml
index 1d4f008..3bacda8 100644
--- a/wagon-tcks/wagon-tck-http/sample-tck-consumer/pom.xml
+++ b/wagon-tcks/wagon-tck-http/sample-tck-consumer/pom.xml
@@ -13,18 +13,19 @@
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
- <version>1.0-beta-6</version>
+ <version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-tck-http</artifactId>
- <version>1.0-beta-7-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <version>4.5</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/GetWagonTests.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/GetWagonTests.java
index 6c4e043..36a764e 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/GetWagonTests.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/GetWagonTests.java
@@ -19,6 +19,10 @@
* under the License.
*/
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.fail;
+import static org.apache.maven.wagon.tck.http.Assertions.assertFileContentsFromResource;
+
import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.StreamWagon;
@@ -38,15 +42,11 @@
import org.junit.Ignore;
import org.junit.Test;
-import javax.servlet.Servlet;
-import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
-import java.util.logging.Logger;
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.fail;
-import static org.apache.maven.wagon.tck.http.Assertions.assertFileContentsFromResource;
+import javax.servlet.Servlet;
+import javax.servlet.http.HttpServletResponse;
public class GetWagonTests
extends HttpWagonTests
@@ -129,7 +129,7 @@
if ( getWagon() instanceof StreamWagon )
{
- logger.info("Connection timeout is: " + ((StreamWagon) getWagon()).getTimeout());
+ System.out.println( "Connection timeout is: " + ( (StreamWagon) getWagon() ).getTimeout() );
}
File target = newTempFile();
@@ -174,7 +174,7 @@
try
{
- logger.info( "Waiting 60 seconds for wagon timeout." );
+ System.out.println( "Waiting 60 seconds for wagon timeout." );
t.join( 30000 );
}
catch ( InterruptedException e )
@@ -182,7 +182,7 @@
e.printStackTrace();
}
- logger.info( "Interrupting thread." );
+ System.out.println( "Interrupting thread." );
t.interrupt();
assertTrue( "TransferFailedException should have been thrown.", holder.getValue() );
@@ -193,10 +193,7 @@
throws ConnectionException, AuthenticationException, ComponentConfigurationException, IOException,
ResourceDoesNotExistException, AuthorizationException
{
- // we use a invalid localhost URL since some Internet Service Providers lately
- // use funny 'search-DNS' which don't handle explicitly marked testing DNS properly.
- // According to RFC-2606 .test, .invalid TLDs etc should work, but in practice it doesn't :(
- if ( !initTest( "http://localhost:65520", null, null ) )
+ if ( !initTest( "http://dummy-host", null, null ) )
{
return;
}
@@ -243,7 +240,8 @@
String myPath = "moved.txt";
String targetPath = "/base.txt";
- getServerFixture().addServlet( "/" + myPath + "/*",
+ getServerFixture().addServlet(
+ "/" + myPath,
new RedirectionServlet( HttpServletResponse.SC_MOVED_PERMANENTLY, myPath,
targetPath, 6 ) );
@@ -258,7 +256,8 @@
String myPath = "moved.txt";
String targetPath = "/base.txt";
- getServerFixture().addServlet( "/" + myPath + "/*",
+ getServerFixture().addServlet(
+ "/" + myPath,
new RedirectionServlet( HttpServletResponse.SC_MOVED_TEMPORARILY, myPath,
targetPath, 6 ) );
@@ -511,7 +510,7 @@
if ( getWagon() instanceof StreamWagon )
{
- logger.info( "Connection timeout is: " + ( (StreamWagon) getWagon() ).getTimeout() );
+ System.out.println( "Connection timeout is: " + ( (StreamWagon) getWagon() ).getTimeout() );
}
File target = newTempFile();
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpWagonTests.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpWagonTests.java
index 593ef64..bbc8227 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpWagonTests.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpWagonTests.java
@@ -19,12 +19,8 @@
* under the License.
*/
-import java.io.File;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
+import static org.apache.maven.wagon.tck.http.util.TestUtil.getResource;
-import org.apache.log4j.Logger;
import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.Wagon;
import org.apache.maven.wagon.authentication.AuthenticationException;
@@ -41,15 +37,17 @@
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
-import static org.apache.maven.wagon.tck.http.util.TestUtil.getResource;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
public abstract class HttpWagonTests
{
private ServerFixture serverFixture;
- private static int defaultPort = 9080;
-
private static PlexusContainer container;
private Wagon wagon;
@@ -64,8 +62,6 @@
private final Set<Object> notificationTargets = new HashSet<Object>();
- protected static Logger logger = Logger.getLogger( HttpWagonTests.class );
-
@Before
public void beforeEach()
throws Exception
@@ -216,8 +212,8 @@
if ( testCaseId == null || !configurator.isSupported( testCaseId ) )
{
- logger.error( "Cannot run test: " + testCaseId
- + ". Wagon under test does not support this test case." );
+ System.out.println( "Cannot run test: " + testCaseId
+ + ". Wagon under test does not support this test case." );
return false;
}
@@ -251,8 +247,8 @@
if ( testCaseId == null || !configurator.configureWagonForTest( wagon, testCaseId ) )
{
- logger.error( "Cannot run test: " + testCaseId
- + ". Wagon under test does not support this test case." );
+ System.out.println( "Cannot run test: " + testCaseId
+ + ". Wagon under test does not support this test case." );
return false;
}
@@ -286,12 +282,7 @@
protected int getDefaultPort()
{
- return defaultPort;
- }
-
- public static void setDefaultPort( int defaultPort )
- {
- HttpWagonTests.defaultPort = defaultPort;
+ return 9080;
}
protected int getPortPropertyValue()
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpsGetWagonTests.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpsGetWagonTests.java
index b1f5d90..786b852 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpsGetWagonTests.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpsGetWagonTests.java
@@ -32,8 +32,7 @@
@Override
protected int getDefaultPort()
{
- return super.getDefaultPort() + 443;
+ return 9443;
}
-
}
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/WagonTestCaseConfigurator.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/WagonTestCaseConfigurator.java
index 9783463..cd96037 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/WagonTestCaseConfigurator.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/WagonTestCaseConfigurator.java
@@ -19,11 +19,10 @@
* under the License.
*/
-import org.apache.log4j.Logger;
import org.apache.maven.wagon.Wagon;
+import org.codehaus.classworlds.ClassRealm;
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.classworlds.realm.ClassRealm;
import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
import org.codehaus.plexus.component.configurator.ComponentConfigurator;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -45,8 +44,6 @@
private String wagonHint;
- private static Logger logger = Logger.getLogger( WagonTestCaseConfigurator.class );
-
public boolean isSupported( final String useCaseId )
{
if ( useCaseConfigs != null )
@@ -55,7 +52,7 @@
if ( config != null && config.getChild( UNSUPPORTED_ELEMENT, false ) != null )
{
- logger.info( "Test case '" + useCaseId + "' is marked as unsupported by this wagon." );
+ System.out.println( "Test case '" + useCaseId + "' is marked as unsupported by this wagon." );
return false;
}
}
@@ -74,23 +71,23 @@
{
if ( config.getChild( UNSUPPORTED_ELEMENT, false ) != null )
{
- logger.error( "Test case '" + useCaseId + "' is marked as unsupported by this wagon." );
+ System.out.println( "Test case '" + useCaseId + "' is marked as unsupported by this wagon." );
return false;
}
else
{
- logger.info( "Configuring wagon for test case: " + useCaseId + " with:\n\n" + config );
+ System.out.println( "Configuring wagon for test case: " + useCaseId + " with:\n\n" + config );
configurator.configureComponent( wagon, useCaseConfigs.getChild( useCaseId, false ), realm );
}
}
else
{
- logger.info( "No wagon configuration found for test case: " + useCaseId );
+ System.out.println( "No wagon configuration found for test case: " + useCaseId );
}
}
else
{
- logger.info( "No test case configurations found." );
+ System.out.println( "No test case configurations found." );
}
return true;
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java
index 6fc902f..3d29674 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java
@@ -19,6 +19,8 @@
* under the License.
*/
+import org.apache.commons.codec.binary.Base64;
+
import java.io.IOException;
import javax.servlet.Filter;
@@ -29,13 +31,9 @@
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.log4j.Logger;
-
public class AuthSnoopFilter
implements Filter
{
- private static Logger logger = Logger.getLogger( AuthSnoopFilter.class );
public void destroy()
{
@@ -49,13 +47,13 @@
if ( authHeader != null )
{
- logger.info( "Authorization: " + authHeader );
+ System.out.println( "Authorization: " + authHeader );
String data = authHeader.substring( "BASIC ".length() );
String decoded = new String( Base64.decodeBase64( data ) );
- logger.info( decoded );
+ System.out.println( decoded );
String[] creds = decoded.split( ":" );
- logger.info( "User: " + creds[0] + "\nPassword: " + creds[1] );
+ System.out.println( "User: " + creds[0] + "\nPassword: " + creds[1] );
}
}
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/LatencyServlet.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/LatencyServlet.java
index 803f82a..cd72c4c 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/LatencyServlet.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/LatencyServlet.java
@@ -19,6 +19,8 @@
* under the License.
*/
+import org.codehaus.plexus.util.IOUtil;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -29,14 +31,9 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
-import org.codehaus.plexus.util.IOUtil;
-
public class LatencyServlet
extends HttpServlet
{
- private static Logger logger = Logger.getLogger(LatencyServlet.class);
-
private static final long serialVersionUID = 1L;
@@ -55,7 +52,7 @@
{
if ( latencyMs < 0 )
{
- logger.info( "Starting infinite wait." );
+ System.out.println( "Starting infinite wait." );
synchronized ( this )
{
try
@@ -85,7 +82,7 @@
in = new FileInputStream( f );
OutputStream out = resp.getOutputStream();
- logger.info( "Starting high-latency transfer. This should take about "
+ System.out.println( "Starting high-latency transfer. This should take about "
+ ( ( f.length() / BUFFER_SIZE * latencyMs / 1000 ) + ( latencyMs / 1000 ) ) + " seconds." );
int read = -1;
@@ -101,7 +98,7 @@
e.printStackTrace();
}
- logger.info( "Writing bytes " + total + "-" + ( total + read - 1 ) + " of " + f.length()
+ System.out.println( "Writing bytes " + total + "-" + ( total + read - 1 ) + " of " + f.length()
+ ". Elapsed time so far: " + ( ( System.currentTimeMillis() - start ) / 1000 ) + " seconds" );
out.write( buf, 0, read );
@@ -114,7 +111,7 @@
IOUtil.close( in );
}
- logger.info( "High-latency transfer done in " + ( System.currentTimeMillis() - start ) + "ms" );
+ System.out.println( "High-latency transfer done in " + ( System.currentTimeMillis() - start ) + "ms" );
}
}
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyConnectionVerifierFilter.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyConnectionVerifierFilter.java
index 87fcd39..56c12ce 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyConnectionVerifierFilter.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyConnectionVerifierFilter.java
@@ -31,12 +31,9 @@
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
-import org.apache.log4j.Logger;
-
public class ProxyConnectionVerifierFilter
implements Filter
{
- private static Logger logger = Logger.getLogger( ProxyConnectionVerifierFilter.class );
public void destroy()
{
@@ -62,7 +59,7 @@
{
for ( String val : Collections.list( vEn ) )
{
- logger.info( key + ": " + val );
+ System.out.println( key + ": " + val );
}
}
}
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/RedirectionServlet.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/RedirectionServlet.java
index 2337e88..174860e 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/RedirectionServlet.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/RedirectionServlet.java
@@ -19,11 +19,12 @@
* under the License.
*/
+import java.io.IOException;
+
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
public class RedirectionServlet
extends HttpServlet
@@ -41,10 +42,10 @@
private final String myPath;
- public RedirectionServlet( final int code, final String targetPath )
+ public RedirectionServlet( final int code, final String path )
{
this.code = code;
- this.targetPath = targetPath;
+ this.targetPath = path;
this.maxRedirects = 1;
this.myPath = null;
}
@@ -81,7 +82,7 @@
else if ( redirectCount <= maxRedirects )
{
resp.setStatus( code );
- resp.setHeader( "Location", myPath + "/" + redirectCount );
+ resp.setHeader( "Location", myPath );
}
else
{
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java
index 151b13e..babec22 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ServerFixture.java
@@ -19,14 +19,8 @@
* under the License.
*/
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
+import static org.apache.maven.wagon.tck.http.util.TestUtil.getResource;
-import javax.servlet.Filter;
-import javax.servlet.Servlet;
-
-import org.apache.log4j.Logger;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
@@ -44,19 +38,21 @@
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.jetty.servlet.SessionHandler;
import org.mortbay.jetty.webapp.WebAppContext;
-import static org.apache.maven.wagon.tck.http.util.TestUtil.getResource;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import javax.servlet.Filter;
+import javax.servlet.Servlet;
public class ServerFixture
{
- private static Logger logger = Logger.getLogger( ServerFixture.class );
-
-
public static final String SERVER_ROOT_RESOURCE_PATH = "default-server-root";
- // it seems that some JDKs have a problem if you use different key stores
- // so we gonna reuse the keystore which is is used in the wagon implementations already
public static final String SERVER_SSL_KEYSTORE_RESOURCE_PATH = "ssl/keystore";
- public static final String SERVER_SSL_KEYSTORE_PASSWORD = "wagonhttp";
+
+ public static final String SERVER_SSL_KEYSTORE_PASSWORD = "password";
public static final String SERVER_HOST = "localhost";
@@ -68,7 +64,7 @@
private final SecurityHandler securityHandler;
- private int filterCount = 0;
+ private int filterCount = 0;;
public ServerFixture( final int port, final boolean ssl )
throws URISyntaxException, IOException
@@ -79,11 +75,6 @@
SslSocketConnector connector = new SslSocketConnector();
String keystore = getResource( SERVER_SSL_KEYSTORE_RESOURCE_PATH ).getAbsolutePath();
- Logger.getLogger(ServerFixture.class.getName()).info("TCK Keystore path: " + keystore);
- System.setProperty( "javax.net.ssl.keyStore", keystore );
- System.setProperty( "javax.net.ssl.trustStore", keystore );
-
-
// connector.setHost( SERVER_HOST );
connector.setPort( port );
connector.setKeystore( keystore );
@@ -121,7 +112,7 @@
webappContext.setContextPath( "/" );
File base = getResource( SERVER_ROOT_RESOURCE_PATH );
- logger.info( "docroot: " + base );
+ System.out.println( "docroot: " + base );
webappContext.setWar( base.getAbsolutePath() );
webappContext.addHandler( securityHandler );
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/util/TestUtil.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/util/TestUtil.java
index f78a9f2..245c233 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/util/TestUtil.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/util/TestUtil.java
@@ -19,6 +19,8 @@
* under the License.
*/
+import org.codehaus.plexus.util.IOUtil;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -32,13 +34,8 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import org.apache.log4j.Logger;
-import org.codehaus.plexus.util.IOUtil;
-
public final class TestUtil
{
- private static Logger logger = Logger.getLogger(TestUtil.class);
-
private static final Map<String, File> bases = new HashMap<String, File>();
@@ -73,7 +70,7 @@
base = new File( "target/tck-resources/" + urlFile.getName() );
base.getParentFile().mkdirs();
- logger.info("unpacking test resources in jar: " + url);
+ System.out.println( "unpacking test resources in jar: " + url );
JarFile jf = null;
try
{
diff --git a/wagon-tcks/wagon-tck-http/src/main/resources/ssl/keystore b/wagon-tcks/wagon-tck-http/src/main/resources/ssl/keystore
new file mode 100644
index 0000000..50e6306
--- /dev/null
+++ b/wagon-tcks/wagon-tck-http/src/main/resources/ssl/keystore
Binary files differ