Package org.apache.maven.wagon.repository

Examples of org.apache.maven.wagon.repository.Repository


    }

    public void testSessionCloseRefusedEventConnectionException()
        throws Exception
    {
        Repository repository = new Repository();

        sessionListenerControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
        sessionListener.sessionDisconnecting( null );
        sessionListener.sessionError( null );
        sessionListenerControl.replay();
View Full Code Here


        transferListener.transferCompleted( null );
        transferListenerControl.replay();

        wagon.fireTransferDebug( "fetch debug message" );

        Repository repository = new Repository();
        wagon.connect( repository );

        wagon.get( artifact, destination );

        transferListenerControl.verify();
View Full Code Here

        transferListener.transferError( null );
        transferListenerControl.replay();

        try
        {
            Repository repository = new Repository();

            WagonMock wagon = new WagonMock( true );

            wagon.addTransferListener( transferListener );
View Full Code Here

        transferListener.transferCompleted( null );
        transferListenerControl.replay();

        wagon.fireTransferDebug( "deploy debug message" );

        Repository repository = new Repository();

        wagon.connect( repository );

        wagon.put( source, artifact );
View Full Code Here

    }

    public void testRepositoryPermissionsOverride()
        throws ConnectionException, AuthenticationException
    {
        Repository repository = new Repository();

        RepositoryPermissions original = new RepositoryPermissions();
        original.setFileMode( "664" );
        repository.setPermissions( original );

        RepositoryPermissions override = new RepositoryPermissions();
        override.setFileMode( "644" );
        wagon.setPermissionsOverride( override );

        wagon.connect( repository );

        assertEquals( override, repository.getPermissions() );
        assertEquals( "644", repository.getPermissions().getFileMode() );
    }
View Full Code Here

    extends CommandExecutorTestCase
{

    protected Repository getTestRepository()
    {
        return new Repository( "test", "scpexe://localhost/" );
    }
View Full Code Here

    }

    public void testRepositoryUserName()
        throws ConnectionException, AuthenticationException
    {
        Repository repository = new Repository( "id", "http://bporter:password@www.example.com/path/to/resource" );

        AuthenticationInfo authenticationInfo = new AuthenticationInfo();
        authenticationInfo.setUserName( "brett" );
        authenticationInfo.setPassword( "pass" );
        wagon.connect( repository, authenticationInfo );
View Full Code Here

    }

    public void testRepositoryUserNameNotGivenInCredentials()
        throws ConnectionException, AuthenticationException
    {
        Repository repository = new Repository( "id", "http://bporter:password@www.example.com/path/to/resource" );

        AuthenticationInfo authenticationInfo = new AuthenticationInfo();
        wagon.connect( repository, authenticationInfo );

        assertEquals( authenticationInfo, wagon.getAuthenticationInfo() );
View Full Code Here

    }

    public void testConnect()
        throws Exception
    {
        getWagon().connect( new Repository( "foo", getTestRepositoryUrl() ), getAuthInfo() );
        assertTrue( true );
    }
View Full Code Here

        File dummy = new File( "src/test/resources/dummy.txt" );
        FileUtils.copyFileToDirectory( dummy, sub );

        String url = getTestRepositoryUrl() + "/" + dir;
        Repository repo = new Repository( "foo", url );
        Wagon wagon = getWagon();
        wagon.connect( repo, getAuthInfo() );
        List<String> files = wagon.getFileList( subDir );
        assertNotNull( files );
        assertEquals( 1, files.size() );
View Full Code Here

TOP

Related Classes of org.apache.maven.wagon.repository.Repository

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.