Package org.apache.maven.wagon

Examples of org.apache.maven.wagon.Wagon.connect()


    {

        final Wagon wagon = (Wagon) MockControl.createControl( Wagon.class ).getMock();
        final Repository repo = new Repository();

        wagon.connect( repo );

        final long timestamp = System.currentTimeMillis();
        final Exception exception = new AuthenticationException( "dummy" );

        SessionEvent event = new SessionEvent( wagon, SessionEvent.SESSION_CLOSED );
View Full Code Here


                httpMethodConfiguration.setReadTimeout( 4000 );
                httpConfiguration.setGet( httpMethodConfiguration );
                AbstractHttpClientWagon.class.cast( wagon ).setHttpConfiguration( httpConfiguration );
            }

            wagon.connect( new Repository( remoteRepository.getId(), remoteRepository.getUrl() ) );

            // we only check connectivity as remote repo can be empty
            wagon.getFileList( "/" );

            return Boolean.TRUE;
View Full Code Here

            {
                authenticationInfo = new AuthenticationInfo( );
                authenticationInfo.setUserName( this.remoteRepository.getUserName( ) );
                authenticationInfo.setPassword( this.remoteRepository.getPassword( ) );
            }
            wagon.connect( new Repository( this.remoteRepository.getId( ), baseIndexUrl ), authenticationInfo,
                           proxyInfo );

            File indexDirectory = indexingContext.getIndexDirectoryFile( );
            if ( !indexDirectory.exists( ) )
            {
View Full Code Here

    {
        final Wagon wagon = EasyMock.createMock( Wagon.class );

        final Repository repo = new Repository();

        wagon.connect( repo );

        final long timestamp = System.currentTimeMillis();

        final Exception exception = new AuthenticationException( "dummy" );
View Full Code Here

    {

        final Wagon wagon = EasyMock.createMock( Wagon.class );
        final Repository repo = new Repository();

        wagon.connect( repo );

        final long timestamp = System.currentTimeMillis();
        final Exception exception = new AuthenticationException( "dummy" );

        SessionEvent event = new SessionEvent( wagon, SessionEvent.SESSION_CLOSED );
View Full Code Here

            // This is the difference to our normal use case:
            // the directory specified in the repo string doesn't yet exist!

            testRepository.setUrl( testRepository.getUrl() + "/dirExists/not_yet_existing/also_not" );

            wagon.connect( testRepository, getAuthInfo() );

            wagon.putDirectory( sourceDir, "testDirectory" );

            destFile = FileTestUtils.createUniqueFile(getName(), getName());
View Full Code Here

            sourceFile.deleteOnExit();

            String resName = "gzip-res.txt";
            String sourceContent = writeTestFileGzip( sourceFile, resName );

            wagon.connect( testRepository );

            File destFile = FileTestUtils.createUniqueFile( getName(), getName() );

            destFile.deleteOnExit();
View Full Code Here

            new File( getDavRepository(), dirName + "/" + dirnames[i] ).mkdirs();
        }

        Wagon wagon = getWagon();

        wagon.connect( testRepository, getAuthInfo() );

        List<String> list = wagon.getFileList( dirName );

        assertNotNull( "file list should not be null.", list );
        assertEquals( "file list should contain 6 items", 6, list.size() );
View Full Code Here

            wagon.setReadTimeout( 1000 );

            Repository testRepository = new Repository();
            testRepository.setUrl( "http://localhost:" + httpServerPort );

            wagon.connect( testRepository );

            File destFile = FileTestUtils.createUniqueFile( getName(), getName() );
            destFile.deleteOnExit();

            wagon.get( "/timeoutfile", destFile );
View Full Code Here

            wagon.setReadTimeout( 1000 );

            Repository testRepository = new Repository();
            testRepository.setUrl( "http://localhost:" + httpServerPort );

            wagon.connect( testRepository );

            wagon.resourceExists( "/timeoutfile" );

            wagon.disconnect();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.