Package org.apache.maven.wagon.providers.http

Examples of org.apache.maven.wagon.providers.http.HttpWagon


            }

            private void runThread()
                throws Exception
            {
                HttpWagon wagon = (HttpWagon) wagonManager.getWagon( repository );
                assertEquals( TEST_USER_AGENT, wagon.getHttpHeaders().getProperty( "User-Agent" ) );
                container.release( wagon );
            }
        } );
    }
View Full Code Here


    private static class ManualWagonProvider implements WagonProvider {

        public Wagon lookup( String roleHint ) throws Exception {
            if ( "http".equals( roleHint ) || "https".equals( roleHint ) ) {
                return new HttpWagon();
            }
            if ( "sramp".equals( roleHint ) ) {
                try {
                    return (Wagon) Class.forName("org.overlord.dtgov.jbpm.util.SrampWagonProxy").newInstance();
                } catch (ClassNotFoundException cnfe) {
View Full Code Here

        if ( file.exists() )
        {
            file.delete();
        }

        HttpWagon httpWagon = new HttpWagon();
        httpWagon.connect( new Repository( "foo", "http://localhost:" + port ) );

        httpWagon.get( "/repository/internal/junit/junit/4.9/junit-4.9.jar", file );

        ZipFile zipFile = new ZipFile( file );
        List<String> entries = getZipEntriesNames( zipFile );
        ZipEntry zipEntry = zipFile.getEntry( "org/junit/runners/JUnit4.class" );
        assertNotNull( "cannot find zipEntry org/junit/runners/JUnit4.class, entries: " + entries + ", content is: "
View Full Code Here

        if ( file.exists() )
        {
            file.delete();
        }

        HttpWagon httpWagon = new HttpWagon();
        httpWagon.connect( new Repository( "foo", "http://localhost:" + port ) );

        httpWagon.get( "/repository/internal/junit/junit/4.9/junit-4.9.jar", file );

        ZipFile zipFile = new ZipFile( file );
        List<String> entries = getZipEntriesNames( zipFile );
        ZipEntry zipEntry = zipFile.getEntry( "org/junit/runners/JUnit4.class" );
        assertNotNull( "cannot find zipEntry org/junit/runners/JUnit4.class, entries: " + entries + ", content is: "
View Full Code Here

        if ( file.exists() )
        {
            file.delete();
        }

        HttpWagon httpWagon = new HttpWagon();
        httpWagon.connect( new Repository( "foo", "http://localhost:" + port ) );

        httpWagon.get( "/repository/"+ id +"/org/apache/archiva/archiva-model/1.4-M4-SNAPSHOT/archiva-model-1.4-M4-SNAPSHOT.jar", file );

        ZipFile zipFile = new ZipFile( file );
        List<String> entries = getZipEntriesNames( zipFile );
        ZipEntry zipEntry = zipFile.getEntry( "org/apache/archiva/model/ArchivaArtifact.class" );
        assertNotNull( "cannot find zipEntry org/apache/archiva/model/ArchivaArtifact.class, entries: " + entries + ", content is: "
View Full Code Here

        Repository repository = new Repository( "httputils", url );

        Wagon wagon;
        if ( "http".equals( repository.getProtocol() ) )
        {
            wagon = new HttpWagon();
        }
        else
        {
            wagon = new FileWagon();
        }
View Full Code Here

    public Wagon lookup(String roleHint)
            throws Exception {
        if ("file".equals(roleHint)) {
            return new FileWagon();
        } else if (roleHint != null && roleHint.startsWith("http")) { // http and https
            return new HttpWagon();
        }
        return null;
    }
View Full Code Here

        if ( file.exists() )
        {
            file.delete();
        }

        HttpWagon httpWagon = new HttpWagon();
        httpWagon.connect( new Repository( "foo", "http://localhost:" + port ) );

        httpWagon.get( "/repository/internal/junit/junit/4.9/junit-4.9.jar", file );

        ZipFile zipFile = new ZipFile( file );
        List<String> entries = getZipEntriesNames( zipFile );
        ZipEntry zipEntry = zipFile.getEntry( "org/junit/runners/JUnit4.class" );
        assertNotNull( "cannot find zipEntry org/junit/runners/JUnit4.class, entries: " + entries + ", content is: "
View Full Code Here

        if ( file.exists() )
        {
            file.delete();
        }

        HttpWagon httpWagon = new HttpWagon();
        httpWagon.connect( new Repository( "foo", "http://localhost:" + port ) );

        httpWagon.get( "/repository/"+ id +"/org/apache/archiva/archiva-model/1.4-M4-SNAPSHOT/archiva-model-1.4-M4-SNAPSHOT.jar", file );

        ZipFile zipFile = new ZipFile( file );
        List<String> entries = getZipEntriesNames( zipFile );
        ZipEntry zipEntry = zipFile.getEntry( "org/apache/archiva/model/ArchivaArtifact.class" );
        assertNotNull( "cannot find zipEntry org/apache/archiva/model/ArchivaArtifact.class, entries: " + entries + ", content is: "
View Full Code Here

        if ( file.exists() )
        {
            file.delete();
        }

        HttpWagon httpWagon = new HttpWagon();
        httpWagon.connect( new Repository( "foo", "http://localhost:" + port ) );

        httpWagon.get( "/repository/internal/junit/junit/4.9/junit-4.9.jar", file );

        //FileWriter fw = new FileWriter( file );
        //IOUtil.copy( is, fw );
        // assert jar contains org/junit/runners/JUnit4.class
        ZipFile zipFile = new ZipFile( file );
View Full Code Here

TOP

Related Classes of org.apache.maven.wagon.providers.http.HttpWagon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.