Package org.apache.maven.wagon.repository

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


    {
        AuthenticationInfo authenticationInfo = new AuthenticationInfo();
        authenticationInfo.setUserName( "me" );
        try
        {
            getWagon().connect( new Repository( "id", getTestRepositoryUrl() ), authenticationInfo );
            fail();
        }
        catch ( AuthenticationException e )
        {
            assertTrue( true );
View Full Code Here


    {
        AuthenticationInfo authenticationInfo = new AuthenticationInfo();
        authenticationInfo.setPassword( "secret" );
        try
        {
            getWagon().connect( new Repository( "id", getTestRepositoryUrl() ), authenticationInfo );
            fail();
        }
        catch ( AuthenticationException e )
        {
            assertEquals( System.getProperty( "user.name" ), authenticationInfo.getUserName() );
View Full Code Here

    {
        super.setUp();

        wagon = new WagonMock( true );

        Repository repository = new Repository();
        wagon.connect( repository );
    }
View Full Code Here

    protected void setUp()
        throws Exception
    {
        super.setUp();
        source =
            new Repository( "test", "scp://" + TestData.getUserName() + "@" + TestData.getHostname() + "/tmp/foo" );

        wagon = (SshWagon) lookup( Wagon.ROLE, "scp" );
        wagon.setInteractive( false );

        this.okHostsProvider = new SingleKnownHostProvider( TestData.getHostname(), CORRECT_KEY );
View Full Code Here

    }

    public void testNoProxyConfiguration()
        throws ConnectionException, AuthenticationException
    {
        Repository repository = new Repository();
        wagon.connect( repository );
        assertNull( wagon.getProxyInfo() );
        assertNull( wagon.getProxyInfo( "http", "www.example.com" ) );
        assertNull( wagon.getProxyInfo( "dav", "www.example.com" ) );
        assertNull( wagon.getProxyInfo( "scp", "www.example.com" ) );
View Full Code Here

    }

    public void testNullProxyConfiguration()
        throws ConnectionException, AuthenticationException
    {
        Repository repository = new Repository();
        wagon.connect( repository, (ProxyInfo) null );
        assertNull( wagon.getProxyInfo() );
        assertNull( wagon.getProxyInfo( "http", "www.example.com" ) );
        assertNull( wagon.getProxyInfo( "dav", "www.example.com" ) );
        assertNull( wagon.getProxyInfo( "scp", "www.example.com" ) );
View Full Code Here

        throws ConnectionException, AuthenticationException
    {
        ProxyInfo proxyInfo = new ProxyInfo();
        proxyInfo.setType( "http" );

        Repository repository = new Repository();
        wagon.connect( repository, proxyInfo );
        assertEquals( proxyInfo, wagon.getProxyInfo() );
        assertEquals( proxyInfo, wagon.getProxyInfo( "http", "www.example.com" ) );
        assertNull( wagon.getProxyInfo( "dav", "www.example.com" ) );
        assertNull( wagon.getProxyInfo( "scp", "www.example.com" ) );
View Full Code Here

                }
                return null;
            }
        };

        Repository repository = new Repository();
        wagon.connect( repository, proxyInfoProvider );
        assertNull( wagon.getProxyInfo() );
        assertEquals( httpProxyInfo, wagon.getProxyInfo( "http", "www.example.com" ) );
        assertEquals( httpProxyInfo, wagon.getProxyInfo( "dav", "www.example.com" ) );
        assertEquals( socksProxyInfo, wagon.getProxyInfo( "scp", "www.example.com" ) );
View Full Code Here

    }

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

        sessionListenerControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
        sessionListener.sessionOpening( null );
        sessionListener.sessionOpened( null );
        sessionListenerControl.replay();
View Full Code Here

    }

    private void runTestSessionConnectionRefusedEvent( final WagonException exception )
        throws ConnectionException, AuthenticationException
    {
        Repository repository = new Repository();

        sessionListenerControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
        sessionListener.sessionOpening( null );
        sessionListener.sessionConnectionRefused( null );
        sessionListenerControl.replay();
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.