maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject [18/51] [partial] maven-aether git commit: [MNG-6007] rename Aether to Maven Artifact Resolver
Date Sat, 03 Sep 2016 20:23:41 GMT
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java b/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
deleted file mode 100644
index d9011a5..0000000
--- a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/HttpTransporterTest.java
+++ /dev/null
@@ -1,1309 +0,0 @@
-package org.eclipse.aether.transport.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 static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.net.ConnectException;
-import java.net.ServerSocket;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.http.client.HttpResponseException;
-import org.apache.http.conn.ConnectTimeoutException;
-import org.apache.http.pool.ConnPoolControl;
-import org.apache.http.pool.PoolStats;
-import org.eclipse.aether.ConfigurationProperties;
-import org.eclipse.aether.DefaultRepositoryCache;
-import org.eclipse.aether.DefaultRepositorySystemSession;
-import org.eclipse.aether.internal.test.util.TestFileUtils;
-import org.eclipse.aether.internal.test.util.TestLoggerFactory;
-import org.eclipse.aether.internal.test.util.TestUtils;
-import org.eclipse.aether.repository.Authentication;
-import org.eclipse.aether.repository.Proxy;
-import org.eclipse.aether.repository.RemoteRepository;
-import org.eclipse.aether.spi.connector.transport.GetTask;
-import org.eclipse.aether.spi.connector.transport.PeekTask;
-import org.eclipse.aether.spi.connector.transport.PutTask;
-import org.eclipse.aether.spi.connector.transport.Transporter;
-import org.eclipse.aether.spi.connector.transport.TransporterFactory;
-import org.eclipse.aether.transfer.NoTransporterException;
-import org.eclipse.aether.transfer.TransferCancelledException;
-import org.eclipse.aether.util.repository.AuthenticationBuilder;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestName;
-
-/**
- */
-public class HttpTransporterTest
-{
-
-    static
-    {
-        System.setProperty( "javax.net.ssl.trustStore",
-                            new File( "src/test/resources/ssl/server-store" ).getAbsolutePath() );
-        System.setProperty( "javax.net.ssl.trustStorePassword", "server-pwd" );
-        System.setProperty( "javax.net.ssl.keyStore",
-                            new File( "src/test/resources/ssl/client-store" ).getAbsolutePath() );
-        System.setProperty( "javax.net.ssl.keyStorePassword", "client-pwd" );
-    }
-
-    private static final String REPO_ID = "test";
-
-    @Rule
-    public TestName testName = new TestName();
-
-    private DefaultRepositorySystemSession session;
-
-    private TransporterFactory factory;
-
-    private Transporter transporter;
-
-    private File repoDir;
-
-    private HttpServer httpServer;
-
-    private Authentication auth;
-
-    private Proxy proxy;
-
-    private RemoteRepository newRepo( String url )
-    {
-        return new RemoteRepository.Builder( REPO_ID, "default", url ).setAuthentication( auth ).setProxy( proxy ).build();
-    }
-
-    private void newTransporter( String url )
-        throws Exception
-    {
-        if ( transporter != null )
-        {
-            transporter.close();
-            transporter = null;
-        }
-        transporter = factory.newInstance( session, newRepo( url ) );
-    }
-
-    @Before
-    public void setUp()
-        throws Exception
-    {
-        System.out.println( "=== " + testName.getMethodName() + " ===" );
-        session = TestUtils.newSession();
-        factory = new HttpTransporterFactory( new TestLoggerFactory() );
-        repoDir = TestFileUtils.createTempDir();
-        TestFileUtils.writeString( new File( repoDir, "file.txt" ), "test" );
-        TestFileUtils.writeString( new File( repoDir, "dir/file.txt" ), "test" );
-        TestFileUtils.writeString( new File( repoDir, "empty.txt" ), "" );
-        TestFileUtils.writeString( new File( repoDir, "some space.txt" ), "space" );
-        File resumable = new File( repoDir, "resume.txt" );
-        TestFileUtils.writeString( resumable, "resumable" );
-        resumable.setLastModified( System.currentTimeMillis() - 90 * 1000 );
-        httpServer = new HttpServer().setRepoDir( repoDir ).start();
-        newTransporter( httpServer.getHttpUrl() );
-    }
-
-    @After
-    public void tearDown()
-        throws Exception
-    {
-        if ( transporter != null )
-        {
-            transporter.close();
-            transporter = null;
-        }
-        if ( httpServer != null )
-        {
-            httpServer.stop();
-            httpServer = null;
-        }
-        factory = null;
-        session = null;
-    }
-
-    @Test
-    public void testClassify()
-    {
-        assertEquals( Transporter.ERROR_OTHER, transporter.classify( new FileNotFoundException() ) );
-        assertEquals( Transporter.ERROR_OTHER, transporter.classify( new HttpResponseException( 403, "Forbidden" ) ) );
-        assertEquals( Transporter.ERROR_NOT_FOUND, transporter.classify( new HttpResponseException( 404, "Not Found" ) ) );
-    }
-
-    @Test
-    public void testPeek()
-        throws Exception
-    {
-        transporter.peek( new PeekTask( URI.create( "repo/file.txt" ) ) );
-    }
-
-    @Test
-    public void testPeek_NotFound()
-        throws Exception
-    {
-        try
-        {
-            transporter.peek( new PeekTask( URI.create( "repo/missing.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 404, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_NOT_FOUND, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testPeek_Closed()
-        throws Exception
-    {
-        transporter.close();
-        try
-        {
-            transporter.peek( new PeekTask( URI.create( "repo/missing.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( IllegalStateException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testPeek_Authenticated()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        transporter.peek( new PeekTask( URI.create( "repo/file.txt" ) ) );
-    }
-
-    @Test
-    public void testPeek_Unauthenticated()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        try
-        {
-            transporter.peek( new PeekTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 401, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testPeek_ProxyAuthenticated()
-        throws Exception
-    {
-        httpServer.setProxyAuthentication( "testuser", "testpass" );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort(), auth );
-        newTransporter( "http://bad.localhost:1/" );
-        transporter.peek( new PeekTask( URI.create( "repo/file.txt" ) ) );
-    }
-
-    @Test
-    public void testPeek_ProxyUnauthenticated()
-        throws Exception
-    {
-        httpServer.setProxyAuthentication( "testuser", "testpass" );
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
-        newTransporter( "http://bad.localhost:1/" );
-        try
-        {
-            transporter.peek( new PeekTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 407, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testPeek_SSL()
-        throws Exception
-    {
-        httpServer.addSslConnector();
-        newTransporter( httpServer.getHttpsUrl() );
-        transporter.peek( new PeekTask( URI.create( "repo/file.txt" ) ) );
-    }
-
-    @Test
-    public void testPeek_Redirect()
-        throws Exception
-    {
-        httpServer.addSslConnector();
-        transporter.peek( new PeekTask( URI.create( "redirect/file.txt" ) ) );
-        transporter.peek( new PeekTask( URI.create( "redirect/file.txt?scheme=https" ) ) );
-    }
-
-    @Test
-    public void testGet_ToMemory()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( task.getDataString(), listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_ToFile()
-        throws Exception
-    {
-        File file = TestFileUtils.createTempFile( "failure" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) ).setDataFile( file ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "test", TestFileUtils.readString( file ) );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "test", listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_EmptyResource()
-        throws Exception
-    {
-        File file = TestFileUtils.createTempFile( "failure" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/empty.txt" ) ).setDataFile( file ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "", TestFileUtils.readString( file ) );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 0, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 0, listener.progressedCount );
-        assertEquals( "", listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_EncodedResourcePath()
-        throws Exception
-    {
-        GetTask task = new GetTask( URI.create( "repo/some%20space.txt" ) );
-        transporter.get( task );
-        assertEquals( "space", task.getDataString() );
-    }
-
-    @Test
-    public void testGet_Authenticated()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( task.getDataString(), listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_Unauthenticated()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        try
-        {
-            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 401, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testGet_ProxyAuthenticated()
-        throws Exception
-    {
-        httpServer.setProxyAuthentication( "testuser", "testpass" );
-        Authentication auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort(), auth );
-        newTransporter( "http://bad.localhost:1/" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( task.getDataString(), listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_ProxyUnauthenticated()
-        throws Exception
-    {
-        httpServer.setProxyAuthentication( "testuser", "testpass" );
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
-        newTransporter( "http://bad.localhost:1/" );
-        try
-        {
-            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 407, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testGet_SSL()
-        throws Exception
-    {
-        httpServer.addSslConnector();
-        newTransporter( httpServer.getHttpsUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( task.getDataString(), listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_WebDav()
-        throws Exception
-    {
-        httpServer.setWebDav( HttpServer.WebDav.REQUIRED );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/dir/file.txt" ) ).setListener( listener );
-        ( (HttpTransporter) transporter ).getState().setWebDav( true );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( task.getDataString(), listener.baos.toString( "UTF-8" ) );
-        assertEquals( httpServer.getLogEntries().toString(), 1, httpServer.getLogEntries().size() );
-    }
-
-    @Test
-    public void testGet_Redirect()
-        throws Exception
-    {
-        httpServer.addSslConnector();
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "redirect/file.txt?scheme=https" ) ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( task.getDataString(), listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_Resume()
-        throws Exception
-    {
-        File file = TestFileUtils.createTempFile( "re" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/resume.txt" ) ).setDataFile( file, true ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "resumable", TestFileUtils.readString( file ) );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 2, listener.dataOffset );
-        assertEquals( 9, listener.dataLength );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "sumable", listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_ResumeLocalContentsOutdated()
-        throws Exception
-    {
-        File file = TestFileUtils.createTempFile( "re" );
-        file.setLastModified( System.currentTimeMillis() - 5 * 60 * 1000 );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/resume.txt" ) ).setDataFile( file, true ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "resumable", TestFileUtils.readString( file ) );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 9, listener.dataLength );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "resumable", listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_ResumeRangesNotSupportedByServer()
-        throws Exception
-    {
-        httpServer.setRangeSupport( false );
-        File file = TestFileUtils.createTempFile( "re" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        GetTask task = new GetTask( URI.create( "repo/resume.txt" ) ).setDataFile( file, true ).setListener( listener );
-        transporter.get( task );
-        assertEquals( "resumable", TestFileUtils.readString( file ) );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 9, listener.dataLength );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "resumable", listener.baos.toString( "UTF-8" ) );
-    }
-
-    @Test
-    public void testGet_Checksums_Nexus()
-        throws Exception
-    {
-        httpServer.setChecksumHeader( HttpServer.ChecksumHeader.NEXUS );
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", task.getChecksums().get( "SHA-1" ) );
-    }
-
-    @Test
-    public void testGet_FileHandleLeak()
-        throws Exception
-    {
-        for ( int i = 0; i < 100; i++ )
-        {
-            File file = TestFileUtils.createTempFile( "failure" );
-            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ).setDataFile( file ) );
-            assertTrue( i + ", " + file.getAbsolutePath(), file.delete() );
-        }
-    }
-
-    @Test
-    public void testGet_NotFound()
-        throws Exception
-    {
-        try
-        {
-            transporter.get( new GetTask( URI.create( "repo/missing.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 404, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_NOT_FOUND, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testGet_Closed()
-        throws Exception
-    {
-        transporter.close();
-        try
-        {
-            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( IllegalStateException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testGet_StartCancelled()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        listener.cancelStart = true;
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) ).setListener( listener );
-        try
-        {
-            transporter.get( task );
-            fail( "Expected error" );
-        }
-        catch ( TransferCancelledException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 0, listener.progressedCount );
-    }
-
-    @Test
-    public void testGet_ProgressCancelled()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        listener.cancelProgress = true;
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) ).setListener( listener );
-        try
-        {
-            transporter.get( task );
-            fail( "Expected error" );
-        }
-        catch ( TransferCancelledException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 4, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 1, listener.progressedCount );
-    }
-
-    @Test
-    public void testPut_FromMemory()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_FromFile()
-        throws Exception
-    {
-        File file = TestFileUtils.createTempFile( "upload" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataFile( file );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_EmptyResource()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 0, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 0, listener.progressedCount );
-        assertEquals( "", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_EncodedResourcePath()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task =
-            new PutTask( URI.create( "repo/some%20space.txt" ) ).setListener( listener ).setDataString( "OK" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 2, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "OK", TestFileUtils.readString( new File( repoDir, "some space.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_Authenticated_ExpectContinue()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_Authenticated_ExpectContinueBroken()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        httpServer.setExpectSupport( HttpServer.ExpectContinue.BROKEN );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_Authenticated_ExpectContinueRejected()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        httpServer.setExpectSupport( HttpServer.ExpectContinue.FAIL );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_Authenticated_ExpectContinueRejected_ExplicitlyConfiguredHeader()
-        throws Exception
-    {
-        Map<String, String> headers = new HashMap<String, String>();
-        headers.put( "Expect", "100-continue" );
-        session.setConfigProperty( ConfigurationProperties.HTTP_HEADERS + ".test", headers );
-        httpServer.setAuthentication( "testuser", "testpass" );
-        httpServer.setExpectSupport( HttpServer.ExpectContinue.FAIL );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_Unauthenticated()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        try
-        {
-            transporter.put( task );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 401, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-        assertEquals( 0, listener.startedCount );
-        assertEquals( 0, listener.progressedCount );
-    }
-
-    @Test
-    public void testPut_ProxyAuthenticated()
-        throws Exception
-    {
-        httpServer.setProxyAuthentication( "testuser", "testpass" );
-        Authentication auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort(), auth );
-        newTransporter( "http://bad.localhost:1/" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_ProxyUnauthenticated()
-        throws Exception
-    {
-        httpServer.setProxyAuthentication( "testuser", "testpass" );
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
-        newTransporter( "http://bad.localhost:1/" );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        try
-        {
-            transporter.put( task );
-            fail( "Expected error" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 407, e.getStatusCode() );
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-        assertEquals( 0, listener.startedCount );
-        assertEquals( 0, listener.progressedCount );
-    }
-
-    @Test
-    public void testPut_SSL()
-        throws Exception
-    {
-        httpServer.addSslConnector();
-        httpServer.setAuthentication( "testuser", "testpass" );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpsUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "file.txt" ) ) );
-    }
-
-    @Test
-    public void testPut_WebDav()
-        throws Exception
-    {
-        httpServer.setWebDav( HttpServer.WebDav.REQUIRED );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task =
-            new PutTask( URI.create( "repo/dir1/dir2/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "dir1/dir2/file.txt" ) ) );
-
-        assertEquals( 5, httpServer.getLogEntries().size() );
-        assertEquals( "OPTIONS", httpServer.getLogEntries().get( 0 ).method );
-        assertEquals( "MKCOL", httpServer.getLogEntries().get( 1 ).method );
-        assertEquals( "/repo/dir1/dir2/", httpServer.getLogEntries().get( 1 ).path );
-        assertEquals( "MKCOL", httpServer.getLogEntries().get( 2 ).method );
-        assertEquals( "/repo/dir1/", httpServer.getLogEntries().get( 2 ).path );
-        assertEquals( "MKCOL", httpServer.getLogEntries().get( 3 ).method );
-        assertEquals( "/repo/dir1/dir2/", httpServer.getLogEntries().get( 3 ).path );
-        assertEquals( "PUT", httpServer.getLogEntries().get( 4 ).method );
-    }
-
-    @Test
-    public void testPut_WebDavOptional_ManuallyDisabled()
-        throws Exception
-    {
-        session.setConfigProperty( "aether.connector.http.webDav." + REPO_ID, "false" );
-        httpServer.setWebDav( HttpServer.WebDav.OPTIONAL );
-        newTransporter( httpServer.getHttpUrl() );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task =
-            new PutTask( URI.create( "repo/dir1/dir2/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "dir1/dir2/file.txt" ) ) );
-
-        assertEquals( httpServer.getLogEntries().toString(), 2, httpServer.getLogEntries().size() );
-        assertEquals( "OPTIONS", httpServer.getLogEntries().get( 0 ).method );
-        assertEquals( "PUT", httpServer.getLogEntries().get( 1 ).method );
-    }
-
-    @Test
-    public void testPut_WebDavOptional_AutomaticallyDisabled_Artifactory()
-        throws Exception
-    {
-        testPut_WebDavOptional_AutomaticallyDisabled( "Artifactory/3.3.0" );
-    }
-
-    @Test
-    public void testPut_WebDavOptional_AutomaticallyDisabled_Nexus()
-        throws Exception
-    {
-        testPut_WebDavOptional_AutomaticallyDisabled( "Nexus/2.9.0-02" );
-    }
-
-    private void testPut_WebDavOptional_AutomaticallyDisabled( String server )
-        throws Exception
-    {
-        httpServer.setServer( server );
-        httpServer.setWebDav( HttpServer.WebDav.OPTIONAL );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task =
-            new PutTask( URI.create( "repo/dir1/dir2/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertTrue( "Count: " + listener.progressedCount, listener.progressedCount > 0 );
-        assertEquals( "upload", TestFileUtils.readString( new File( repoDir, "dir1/dir2/file.txt" ) ) );
-
-        assertEquals( httpServer.getLogEntries().toString(), 2, httpServer.getLogEntries().size() );
-        assertEquals( "OPTIONS", httpServer.getLogEntries().get( 0 ).method );
-        assertEquals( "PUT", httpServer.getLogEntries().get( 1 ).method );
-    }
-
-    @Test
-    public void testPut_FileHandleLeak()
-        throws Exception
-    {
-        for ( int i = 0; i < 100; i++ )
-        {
-            File src = TestFileUtils.createTempFile( "upload" );
-            File dst = new File( repoDir, "file.txt" );
-            transporter.put( new PutTask( URI.create( "repo/file.txt" ) ).setDataFile( src ) );
-            assertTrue( i + ", " + src.getAbsolutePath(), src.delete() );
-            assertTrue( i + ", " + dst.getAbsolutePath(), dst.delete() );
-        }
-    }
-
-    @Test
-    public void testPut_Closed()
-        throws Exception
-    {
-        transporter.close();
-        try
-        {
-            transporter.put( new PutTask( URI.create( "repo/missing.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( IllegalStateException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test
-    public void testPut_StartCancelled()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        listener.cancelStart = true;
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        try
-        {
-            transporter.put( task );
-            fail( "Expected error" );
-        }
-        catch ( TransferCancelledException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 0, listener.progressedCount );
-    }
-
-    @Test
-    public void testPut_ProgressCancelled()
-        throws Exception
-    {
-        RecordingTransportListener listener = new RecordingTransportListener();
-        listener.cancelProgress = true;
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        try
-        {
-            transporter.put( task );
-            fail( "Expected error" );
-        }
-        catch ( TransferCancelledException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-        assertEquals( 0, listener.dataOffset );
-        assertEquals( 6, listener.dataLength );
-        assertEquals( 1, listener.startedCount );
-        assertEquals( 1, listener.progressedCount );
-    }
-
-    @Test
-    public void testGetPut_AuthCache()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        GetTask get = new GetTask( URI.create( "repo/file.txt" ) );
-        transporter.get( get );
-        RecordingTransportListener listener = new RecordingTransportListener();
-        PutTask task = new PutTask( URI.create( "repo/file.txt" ) ).setListener( listener ).setDataString( "upload" );
-        transporter.put( task );
-        assertEquals( 1, listener.startedCount );
-    }
-
-    @Test( timeout = 20000 )
-    public void testConcurrency()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
-        Thread threads[] = new Thread[20];
-        for ( int i = 0; i < threads.length; i++ )
-        {
-            final String path = "repo/file.txt?i=" + i;
-            threads[i] = new Thread()
-            {
-                @Override
-                public void run()
-                {
-                    try
-                    {
-                        for ( int j = 0; j < 100; j++ )
-                        {
-                            GetTask task = new GetTask( URI.create( path ) );
-                            transporter.get( task );
-                            assertEquals( "test", task.getDataString() );
-                        }
-                    }
-                    catch ( Throwable t )
-                    {
-                        error.compareAndSet( null, t );
-                        System.err.println( path );
-                        t.printStackTrace();
-                    }
-                }
-            };
-            threads[i].setName( "Task-" + i );
-        }
-        for ( Thread thread : threads )
-        {
-            thread.start();
-        }
-        for ( Thread thread : threads )
-        {
-            thread.join();
-        }
-        assertNull( String.valueOf( error.get() ), error.get() );
-    }
-
-    @Test( timeout = 1000 )
-    public void testConnectTimeout()
-        throws Exception
-    {
-        session.setConfigProperty( ConfigurationProperties.CONNECT_TIMEOUT, 100 );
-        int port = 1;
-        newTransporter( "http://localhost:" + port );
-        try
-        {
-            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Expected error" );
-        }
-        catch ( ConnectTimeoutException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-        catch ( ConnectException e )
-        {
-            assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-        }
-    }
-
-    @Test( timeout = 1000 )
-    public void testRequestTimeout()
-        throws Exception
-    {
-        session.setConfigProperty( ConfigurationProperties.REQUEST_TIMEOUT, 100 );
-        ServerSocket server = new ServerSocket( 0 );
-        newTransporter( "http://localhost:" + server.getLocalPort() );
-        try
-        {
-            try
-            {
-                transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-                fail( "Expected error" );
-            }
-            catch ( SocketTimeoutException e )
-            {
-                assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
-            }
-        }
-        finally
-        {
-            server.close();
-        }
-    }
-
-    @Test
-    public void testUserAgent()
-        throws Exception
-    {
-        session.setConfigProperty( ConfigurationProperties.USER_AGENT, "SomeTest/1.0" );
-        newTransporter( httpServer.getHttpUrl() );
-        transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-        assertEquals( 1, httpServer.getLogEntries().size() );
-        for ( HttpServer.LogEntry log : httpServer.getLogEntries() )
-        {
-            assertEquals( "SomeTest/1.0", log.headers.get( "User-Agent" ) );
-        }
-    }
-
-    @Test
-    public void testCustomHeaders()
-        throws Exception
-    {
-        Map<String, String> headers = new HashMap<String, String>();
-        headers.put( "User-Agent", "Custom/1.0" );
-        headers.put( "X-CustomHeader", "Custom-Value" );
-        session.setConfigProperty( ConfigurationProperties.USER_AGENT, "SomeTest/1.0" );
-        session.setConfigProperty( ConfigurationProperties.HTTP_HEADERS + ".test", headers );
-        newTransporter( httpServer.getHttpUrl() );
-        transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-        assertEquals( 1, httpServer.getLogEntries().size() );
-        for ( HttpServer.LogEntry log : httpServer.getLogEntries() )
-        {
-            for ( Map.Entry<String, String> entry : headers.entrySet() )
-            {
-                assertEquals( entry.getKey(), entry.getValue(), log.headers.get( entry.getKey() ) );
-            }
-        }
-    }
-
-    @Test
-    public void testCredentialEncoding_Default()
-        throws Exception
-    {
-        testCredentialEncoding( null );
-    }
-
-    @Test
-    public void testCredentialEncoding_Utf8()
-        throws Exception
-    {
-        testCredentialEncoding( "UTF-8" );
-    }
-
-    private void testCredentialEncoding( String encoding )
-        throws Exception
-    {
-        session.setConfigProperty( ConfigurationProperties.HTTP_CREDENTIAL_ENCODING, encoding );
-        String username = "testuser", password = "\u00e4\u00f6\u00fc";
-        httpServer.setAuthentication( username, password );
-        httpServer.setCredentialEncoding( encoding );
-        auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-    }
-
-    @Test
-    public void testServerAuthScope_FollowsSslRedirect()
-        throws Exception
-    {
-        String username = "testuser", password = "testpass";
-        httpServer.setAuthentication( username, password );
-        httpServer.addSslConnector();
-        auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
-        newTransporter( httpServer.getHttpUrl() );
-        transporter.get( new GetTask( URI.create( "redirect/file.txt?scheme=https" ) ) );
-    }
-
-    @Test
-    public void testServerAuthScope_FollowsRedirectToDifferentHost_EnabledByRepoId()
-        throws Exception
-    {
-        session.setConfigProperty( ConfigurationProperties.HTTP_REDIRECTED_AUTHENTICATION + "." + REPO_ID, "true" );
-        String username = "testuser", password = "testpass";
-        httpServer.setAuthentication( username, password );
-        auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
-        newTransporter( "http://redirect.localhost:1/" );
-        GetTask task = new GetTask( URI.create( "redirect/file.txt?host=" + httpServer.getHost() ) );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-    }
-
-    @Test
-    public void testServerAuthScope_FollowsRedirectToDifferentHost_EnabledByHostName()
-        throws Exception
-    {
-        session.setConfigProperty( ConfigurationProperties.HTTP_REDIRECTED_AUTHENTICATION, " REDIRECT.localhost , foo" );
-        String username = "testuser", password = "testpass";
-        httpServer.setAuthentication( username, password );
-        auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
-        newTransporter( "http://redirect.localhost:1/" );
-        GetTask task = new GetTask( URI.create( "redirect/file.txt?host=" + httpServer.getHost() ) );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-    }
-
-    @Test
-    public void testServerAuthScope_FollowsRedirectToDifferentHost_DisabledByDefault()
-        throws Exception
-    {
-        String username = "testuser", password = "testpass";
-        httpServer.setAuthentication( username, password );
-        auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
-        newTransporter( "http://redirect.localhost:1/" );
-        GetTask task = new GetTask( URI.create( "redirect/file.txt?host=" + httpServer.getHost() ) );
-        try
-        {
-            transporter.get( task );
-            fail( "Server auth must not be used for redirect destination" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 401, e.getStatusCode() );
-        }
-    }
-
-    @Test
-    public void testServerAuthScope_NotUsedForProxy()
-        throws Exception
-    {
-        String username = "testuser", password = "testpass";
-        httpServer.setProxyAuthentication( username, password );
-        auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort() );
-        newTransporter( "http://" + httpServer.getHost() + ":12/" );
-        try
-        {
-            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Server auth must not be used as proxy auth" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 407, e.getStatusCode() );
-        }
-    }
-
-    @Test
-    public void testProxyAuthScope_NotUsedForServer()
-        throws Exception
-    {
-        String username = "testuser", password = "testpass";
-        httpServer.setAuthentication( username, password );
-        Authentication auth = new AuthenticationBuilder().addUsername( username ).addPassword( password ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort(), auth );
-        newTransporter( "http://" + httpServer.getHost() + ":12/" );
-        try
-        {
-            transporter.get( new GetTask( URI.create( "repo/file.txt" ) ) );
-            fail( "Proxy auth must not be used as server auth" );
-        }
-        catch ( HttpResponseException e )
-        {
-            assertEquals( 401, e.getStatusCode() );
-        }
-    }
-
-    @Test
-    public void testAuthSchemeReuse()
-        throws Exception
-    {
-        httpServer.setAuthentication( "testuser", "testpass" );
-        httpServer.setProxyAuthentication( "proxyuser", "proxypass" );
-        session.setCache( new DefaultRepositoryCache() );
-        auth = new AuthenticationBuilder().addUsername( "testuser" ).addPassword( "testpass" ).build();
-        Authentication auth = new AuthenticationBuilder().addUsername( "proxyuser" ).addPassword( "proxypass" ).build();
-        proxy = new Proxy( Proxy.TYPE_HTTP, httpServer.getHost(), httpServer.getHttpPort(), auth );
-        newTransporter( "http://bad.localhost:1/" );
-        GetTask task = new GetTask( URI.create( "repo/file.txt" ) );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 3, httpServer.getLogEntries().size() );
-        httpServer.getLogEntries().clear();
-        newTransporter( "http://bad.localhost:1/" );
-        task = new GetTask( URI.create( "repo/file.txt" ) );
-        transporter.get( task );
-        assertEquals( "test", task.getDataString() );
-        assertEquals( 1, httpServer.getLogEntries().size() );
-        assertNotNull( httpServer.getLogEntries().get( 0 ).headers.get( "Authorization" ) );
-        assertNotNull( httpServer.getLogEntries().get( 0 ).headers.get( "Proxy-Authorization" ) );
-    }
-
-    @Test
-    public void testConnectionReuse()
-        throws Exception
-    {
-        httpServer.addSslConnector();
-        session.setCache( new DefaultRepositoryCache() );
-        for ( int i = 0; i < 3; i++ )
-        {
-            newTransporter( httpServer.getHttpsUrl() );
-            GetTask task = new GetTask( URI.create( "repo/file.txt" ) );
-            transporter.get( task );
-            assertEquals( "test", task.getDataString() );
-        }
-        PoolStats stats =
-            ( (ConnPoolControl<?>) ( (HttpTransporter) transporter ).getState().getConnectionManager() ).getTotalStats();
-        assertEquals( stats.toString(), 1, stats.getAvailable() );
-    }
-
-    @Test( expected = NoTransporterException.class )
-    public void testInit_BadProtocol()
-        throws Exception
-    {
-        newTransporter( "bad:/void" );
-    }
-
-    @Test( expected = NoTransporterException.class )
-    public void testInit_BadUrl()
-        throws Exception
-    {
-        newTransporter( "http://localhost:NaN" );
-    }
-
-    @Test
-    public void testInit_CaseInsensitiveProtocol()
-        throws Exception
-    {
-        newTransporter( "http://localhost" );
-        newTransporter( "HTTP://localhost" );
-        newTransporter( "Http://localhost" );
-        newTransporter( "https://localhost" );
-        newTransporter( "HTTPS://localhost" );
-        newTransporter( "HttpS://localhost" );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/RecordingTransportListener.java
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/RecordingTransportListener.java b/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/RecordingTransportListener.java
deleted file mode 100644
index d88a320..0000000
--- a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/RecordingTransportListener.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.eclipse.aether.transport.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.ByteArrayOutputStream;
-import java.nio.ByteBuffer;
-
-import org.eclipse.aether.spi.connector.transport.TransportListener;
-import org.eclipse.aether.transfer.TransferCancelledException;
-
-class RecordingTransportListener
-    extends TransportListener
-{
-
-    public final ByteArrayOutputStream baos = new ByteArrayOutputStream( 1024 );
-
-    public long dataOffset;
-
-    public long dataLength;
-
-    public int startedCount;
-
-    public int progressedCount;
-
-    public boolean cancelStart;
-
-    public boolean cancelProgress;
-
-    @Override
-    public void transportStarted( long dataOffset, long dataLength )
-        throws TransferCancelledException
-    {
-        startedCount++;
-        progressedCount = 0;
-        this.dataLength = dataLength;
-        this.dataOffset = dataOffset;
-        baos.reset();
-        if ( cancelStart )
-        {
-            throw new TransferCancelledException();
-        }
-    }
-
-    @Override
-    public void transportProgressed( ByteBuffer data )
-        throws TransferCancelledException
-    {
-        progressedCount++;
-        baos.write( data.array(), data.arrayOffset() + data.position(), data.remaining() );
-        if ( cancelProgress )
-        {
-            throw new TransferCancelledException();
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/UriUtilsTest.java
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/UriUtilsTest.java b/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/UriUtilsTest.java
deleted file mode 100644
index e3ea9fa..0000000
--- a/aether-transport-http/src/test/java/org/eclipse/aether/transport/http/UriUtilsTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.eclipse.aether.transport.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 static org.junit.Assert.*;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.junit.Test;
-
-public class UriUtilsTest
-{
-
-    private String resolve( URI base, String ref )
-    {
-        return UriUtils.resolve( base, URI.create( ref ) ).toString();
-    }
-
-    @Test
-    public void testResolve_BaseEmptyPath()
-    {
-        URI base = URI.create( "http://host" );
-        assertEquals( "http://host/file.jar", resolve( base, "file.jar" ) );
-        assertEquals( "http://host/dir/file.jar", resolve( base, "dir/file.jar" ) );
-        assertEquals( "http://host?arg=val", resolve( base, "?arg=val" ) );
-        assertEquals( "http://host/file?arg=val", resolve( base, "file?arg=val" ) );
-        assertEquals( "http://host/dir/file?arg=val", resolve( base, "dir/file?arg=val" ) );
-    }
-
-    @Test
-    public void testResolve_BaseRootPath()
-    {
-        URI base = URI.create( "http://host/" );
-        assertEquals( "http://host/file.jar", resolve( base, "file.jar" ) );
-        assertEquals( "http://host/dir/file.jar", resolve( base, "dir/file.jar" ) );
-        assertEquals( "http://host/?arg=val", resolve( base, "?arg=val" ) );
-        assertEquals( "http://host/file?arg=val", resolve( base, "file?arg=val" ) );
-        assertEquals( "http://host/dir/file?arg=val", resolve( base, "dir/file?arg=val" ) );
-    }
-
-    @Test
-    public void testResolve_BasePathTrailingSlash()
-    {
-        URI base = URI.create( "http://host/sub/dir/" );
-        assertEquals( "http://host/sub/dir/file.jar", resolve( base, "file.jar" ) );
-        assertEquals( "http://host/sub/dir/dir/file.jar", resolve( base, "dir/file.jar" ) );
-        assertEquals( "http://host/sub/dir/?arg=val", resolve( base, "?arg=val" ) );
-        assertEquals( "http://host/sub/dir/file?arg=val", resolve( base, "file?arg=val" ) );
-        assertEquals( "http://host/sub/dir/dir/file?arg=val", resolve( base, "dir/file?arg=val" ) );
-    }
-
-    @Test
-    public void testResolve_BasePathNoTrailingSlash()
-    {
-        URI base = URI.create( "http://host/sub/d%20r" );
-        assertEquals( "http://host/sub/d%20r/file.jar", resolve( base, "file.jar" ) );
-        assertEquals( "http://host/sub/d%20r/dir/file.jar", resolve( base, "dir/file.jar" ) );
-        assertEquals( "http://host/sub/d%20r?arg=val", resolve( base, "?arg=val" ) );
-        assertEquals( "http://host/sub/d%20r/file?arg=val", resolve( base, "file?arg=val" ) );
-        assertEquals( "http://host/sub/d%20r/dir/file?arg=val", resolve( base, "dir/file?arg=val" ) );
-    }
-
-    private List<URI> getDirs( String base, String uri )
-    {
-        return UriUtils.getDirectories( ( base != null ) ? URI.create( base ) : null, URI.create( uri ) );
-    }
-
-    private void assertUris( List<URI> actual, String... expected )
-    {
-        List<String> uris = new ArrayList<String>( actual.size() );
-        for ( URI uri : actual )
-        {
-            uris.add( uri.toString() );
-        }
-        assertEquals( Arrays.asList( expected ), uris );
-    }
-
-    @Test
-    public void testGetDirectories_NoBase()
-    {
-        List<URI> parents = getDirs( null, "http://host/repo/sub/dir/file.jar" );
-        assertUris( parents, "http://host/repo/sub/dir/", "http://host/repo/sub/", "http://host/repo/" );
-
-        parents = getDirs( null, "http://host/repo/sub/dir/?file.jar" );
-        assertUris( parents, "http://host/repo/sub/dir/", "http://host/repo/sub/", "http://host/repo/" );
-
-        parents = getDirs( null, "http://host/" );
-        assertUris( parents );
-    }
-
-    @Test
-    public void testGetDirectories_ExplicitBaseTrailingSlash()
-    {
-        List<URI> parents = getDirs( "http://host/repo/", "http://host/repo/sub/dir/file.jar" );
-        assertUris( parents, "http://host/repo/sub/dir/", "http://host/repo/sub/" );
-
-        parents = getDirs( "http://host/repo/", "http://host/repo/sub/dir/?file.jar" );
-        assertUris( parents, "http://host/repo/sub/dir/", "http://host/repo/sub/" );
-
-        parents = getDirs( "http://host/repo/", "http://host/" );
-        assertUris( parents );
-    }
-
-    @Test
-    public void testGetDirectories_ExplicitBaseNoTrailingSlash()
-    {
-        List<URI> parents = getDirs( "http://host/repo", "http://host/repo/sub/dir/file.jar" );
-        assertUris( parents, "http://host/repo/sub/dir/", "http://host/repo/sub/" );
-
-        parents = getDirs( "http://host/repo", "http://host/repo/sub/dir/?file.jar" );
-        assertUris( parents, "http://host/repo/sub/dir/", "http://host/repo/sub/" );
-
-        parents = getDirs( "http://host/repo", "http://host/" );
-        assertUris( parents );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-http/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/resources/logback.xml b/aether-transport-http/src/test/resources/logback.xml
deleted file mode 100644
index 6990840..0000000
--- a/aether-transport-http/src/test/resources/logback.xml
+++ /dev/null
@@ -1,35 +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.
- !-->
-
-<configuration>
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-    <encoder>
-      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
-    </encoder>
-  </appender>
-
-  <root level="DEBUG">
-    <appender-ref ref="STDOUT" />
-  </root>
-
-  <logger name="org.apache.http.wire" level="INFO" />
-  <logger name="org.eclipse.jetty" level="INFO" />
-</configuration>

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-http/src/test/resources/ssl/README.txt
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/resources/ssl/README.txt b/aether-transport-http/src/test/resources/ssl/README.txt
deleted file mode 100644
index b1be71c..0000000
--- a/aether-transport-http/src/test/resources/ssl/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-client-store generated via
-> keytool -genkey -alias localhost -keypass client-pwd -keystore client-store -storepass client-pwd -validity 4096 -dname "cn=localhost, ou=None, L=Seattle, ST=Washington, o=ExampleOrg, c=US" -keyalg RSA
-
-server-store generated via
-> keytool -genkey -alias localhost -keypass server-pwd -keystore server-store -storepass server-pwd -validity 4096 -dname "cn=localhost, ou=None, L=Seattle, ST=Washington, o=ExampleOrg, c=US" -keyalg RSA

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-http/src/test/resources/ssl/client-store
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/resources/ssl/client-store b/aether-transport-http/src/test/resources/ssl/client-store
deleted file mode 100644
index fbfb39d..0000000
Binary files a/aether-transport-http/src/test/resources/ssl/client-store and /dev/null differ

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-http/src/test/resources/ssl/server-store
----------------------------------------------------------------------
diff --git a/aether-transport-http/src/test/resources/ssl/server-store b/aether-transport-http/src/test/resources/ssl/server-store
deleted file mode 100644
index 6137fee..0000000
Binary files a/aether-transport-http/src/test/resources/ssl/server-store and /dev/null differ

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-wagon/pom.xml
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/pom.xml b/aether-transport-wagon/pom.xml
deleted file mode 100644
index bd3ad2a..0000000
--- a/aether-transport-wagon/pom.xml
+++ /dev/null
@@ -1,125 +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.aether</groupId>
-    <artifactId>aether</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>aether-transport-wagon</artifactId>
-
-  <name>Aether Transport Wagon</name>
-  <description>
-    A transport implementation based on Maven Wagon.
-  </description>
-
-  <properties>
-    <wagonVersion>1.0</wagonVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven.aether</groupId>
-      <artifactId>aether-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.aether</groupId>
-      <artifactId>aether-spi</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.aether</groupId>
-      <artifactId>aether-util</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.wagon</groupId>
-      <artifactId>wagon-provider-api</artifactId>
-      <version>${wagonVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-      <scope>provided</scope>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-annotations</artifactId>
-      <scope>provided</scope>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-classworlds</artifactId>
-      <version>2.4.2</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.sisu</groupId>
-      <artifactId>org.eclipse.sisu.plexus</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.sonatype.sisu</groupId>
-      <artifactId>sisu-guice</artifactId>
-      <classifier>no_aop</classifier>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.aether</groupId>
-      <artifactId>aether-test-util</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-component-metadata</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.eclipse.sisu</groupId>
-        <artifactId>sisu-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonConfigurator.java
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonConfigurator.java b/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonConfigurator.java
deleted file mode 100644
index 808d2b7..0000000
--- a/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonConfigurator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.eclipse.aether.internal.transport.wagon;
-
-/*
- * 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.Wagon;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.classworlds.realm.ClassRealm;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.component.configurator.AbstractComponentConfigurator;
-import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
-import org.codehaus.plexus.component.configurator.ConfigurationListener;
-import org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter;
-import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.eclipse.aether.transport.wagon.WagonConfigurator;
-
-/**
- * A wagon configurator based on the Plexus component configuration framework.
- */
-@Component( role = WagonConfigurator.class, hint = "plexus" )
-public class PlexusWagonConfigurator
-    implements WagonConfigurator
-{
-
-    @Requirement
-    private PlexusContainer container;
-
-    /**
-     * Creates an uninitialized wagon configurator.
-     * 
-     * @noreference This constructor only supports the Plexus IoC container and should not be called directly by
-     *              clients.
-     */
-    public PlexusWagonConfigurator()
-    {
-        // enables no-arg constructor
-    }
-
-    /**
-     * Creates a wagon configurator using the specified Plexus container.
-     * 
-     * @param container The Plexus container instance to use, must not be {@code null}.
-     */
-    public PlexusWagonConfigurator( PlexusContainer container )
-    {
-        if ( container == null )
-        {
-            throw new IllegalArgumentException( "plexus container has not been specified" );
-        }
-        this.container = container;
-    }
-
-    public void configure( Wagon wagon, Object configuration )
-        throws Exception
-    {
-        PlexusConfiguration config = null;
-        if ( configuration instanceof PlexusConfiguration )
-        {
-            config = (PlexusConfiguration) configuration;
-        }
-        else if ( configuration instanceof Xpp3Dom )
-        {
-            config = new XmlPlexusConfiguration( (Xpp3Dom) configuration );
-        }
-        else if ( configuration == null )
-        {
-            return;
-        }
-        else
-        {
-            throw new IllegalArgumentException( "Unexpected configuration type: " + configuration.getClass().getName() );
-        }
-
-        WagonComponentConfigurator configurator = new WagonComponentConfigurator();
-
-        configurator.configureComponent( wagon, config, container.getContainerRealm() );
-    }
-
-    static class WagonComponentConfigurator
-        extends AbstractComponentConfigurator
-    {
-
-        @Override
-        public void configureComponent( Object component, PlexusConfiguration configuration,
-                                        ExpressionEvaluator expressionEvaluator, ClassRealm containerRealm,
-                                        ConfigurationListener listener )
-            throws ComponentConfigurationException
-        {
-            ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();
-
-            converter.processConfiguration( converterLookup, component, containerRealm, configuration,
-                                            expressionEvaluator, listener );
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonProvider.java
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonProvider.java b/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonProvider.java
deleted file mode 100644
index 6f40f0d..0000000
--- a/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/PlexusWagonProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.eclipse.aether.internal.transport.wagon;
-
-/*
- * 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.Wagon;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
-import org.eclipse.aether.transport.wagon.WagonProvider;
-
-/**
- * A wagon provider backed by a Plexus container and the wagons registered with this container.
- */
-@Component( role = WagonProvider.class, hint = "plexus" )
-public class PlexusWagonProvider
-    implements WagonProvider
-{
-
-    @Requirement
-    private PlexusContainer container;
-
-    /**
-     * Creates an uninitialized wagon provider.
-     * 
-     * @noreference This constructor only supports the Plexus IoC container and should not be called directly by
-     *              clients.
-     */
-    public PlexusWagonProvider()
-    {
-        // enables no-arg constructor
-    }
-
-    /**
-     * Creates a wagon provider using the specified Plexus container.
-     * 
-     * @param container The Plexus container instance to use, must not be {@code null}.
-     */
-    public PlexusWagonProvider( PlexusContainer container )
-    {
-        if ( container == null )
-        {
-            throw new IllegalArgumentException( "plexus container has not been specified" );
-        }
-        this.container = container;
-    }
-
-    public Wagon lookup( String roleHint )
-        throws Exception
-    {
-        return container.lookup( Wagon.class, roleHint );
-    }
-
-    public void release( Wagon wagon )
-    {
-        try
-        {
-            if ( wagon != null )
-            {
-                container.release( wagon );
-            }
-        }
-        catch ( Exception e )
-        {
-            // too bad
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/package-info.java
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/package-info.java b/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/package-info.java
deleted file mode 100644
index df14e9c..0000000
--- a/aether-transport-wagon/src/main/java/org/eclipse/aether/internal/transport/wagon/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// CHECKSTYLE_OFF: RegexpHeader
-/*
- * 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.
- */
-/**
- * Integration with the Plexus IoC container which is the native runtime environment expected by many wagon
- * implementations.
- */
-package org.eclipse.aether.internal.transport.wagon;
-

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonCancelledException.java
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonCancelledException.java b/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonCancelledException.java
deleted file mode 100644
index 105917f..0000000
--- a/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonCancelledException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.aether.transport.wagon;
-
-/*
- * 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.eclipse.aether.transfer.TransferCancelledException;
-
-/**
- * Unchecked exception to allow the checked {@link TransferCancelledException} to bubble up from a wagon.
- */
-class WagonCancelledException
-    extends RuntimeException
-{
-
-    public WagonCancelledException( TransferCancelledException cause )
-    {
-        super( cause );
-    }
-
-    public static Exception unwrap( Exception e )
-    {
-        if ( e instanceof WagonCancelledException )
-        {
-            e = (Exception) e.getCause();
-        }
-        return e;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonConfigurator.java
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonConfigurator.java b/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonConfigurator.java
deleted file mode 100644
index 42399cb..0000000
--- a/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonConfigurator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.eclipse.aether.transport.wagon;
-
-/*
- * 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.Wagon;
-
-/**
- * A component to configure wagon instances with provider-specific parameters.
- */
-public interface WagonConfigurator
-{
-
-    /**
-     * Configures the specified wagon instance with the given configuration.
-     * 
-     * @param wagon The wagon instance to configure, must not be {@code null}.
-     * @param configuration The configuration to apply to the wagon instance, must not be {@code null}.
-     * @throws Exception If the configuration could not be applied to the wagon.
-     */
-    void configure( Wagon wagon, Object configuration )
-        throws Exception;
-
-}

http://git-wip-us.apache.org/repos/asf/maven-aether/blob/27f8bd73/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonProvider.java
----------------------------------------------------------------------
diff --git a/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonProvider.java b/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonProvider.java
deleted file mode 100644
index 77bf9d6..0000000
--- a/aether-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonProvider.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.aether.transport.wagon;
-
-/*
- * 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.Wagon;
-
-/**
- * A component to acquire and release wagon instances for uploads/downloads.
- */
-public interface WagonProvider
-{
-
-    /**
-     * Acquires a wagon instance that matches the specified role hint. The role hint is derived from the URI scheme,
-     * e.g. "http" or "file".
-     * 
-     * @param roleHint The role hint to get a wagon for, must not be {@code null}.
-     * @return The requested wagon instance, never {@code null}.
-     * @throws Exception If no wagon could be retrieved for the specified role hint.
-     */
-    Wagon lookup( String roleHint )
-        throws Exception;
-
-    /**
-     * Releases the specified wagon. A wagon provider may either free any resources allocated for the wagon instance or
-     * return the instance back to a pool for future use.
-     * 
-     * @param wagon The wagon to release, may be {@code null}.
-     */
-    void release( Wagon wagon );
-
-}


Mime
View raw message