Package org.apache.maven.wagon.repository

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


    public void testTransferEventProperties()
        throws ConnectionException, AuthenticationException
    {
        final Wagon wagon = (Wagon) MockControl.createControl( Wagon.class ).getMock();

        final Repository repo = new Repository();

        wagon.connect( repo );

        final long timestamp = System.currentTimeMillis();
View Full Code Here


        catch ( Exception e )
        {
            throw new IllegalStateException( "Failed to start: " + e.getMessage(), e );
        }

        repo = new Repository( "test", baseUrl );

        wagon.connect( repo, auth, proxy );

        return true;
    }
View Full Code Here

        return getTestFile( "target/test-output/http-repository/newfolder/folder2" );
    }

    private void assertURL( String userUrl, String expectedUrl )
    {
        Repository repo = new Repository( "test-geturl", userUrl );
        String actualUrl = ( new WebDavWagon() ).getURL( repo );
        assertEquals( "WebDavWagon.getURL(" + userUrl + ")", expectedUrl, actualUrl );
    }
View Full Code Here

     * @param url repository url
     * @throws MojoExecutionException
     */
    public void connect( String id, String url ) throws MojoExecutionException
    {
        Repository repository = new Repository( id, url );

        try
        {
            m_wagon = m_wagonManager.getWagon( repository );
        }
        catch ( UnsupportedProtocolException e )
        {
            throw new MojoExecutionException( "Unsupported protocol: '" + repository.getProtocol() + "'", e );
        }
        catch ( WagonException e )
        {
            throw new MojoExecutionException( "Unable to configure Wagon: '" + repository.getProtocol() + "'", e );
        }

        try
        {
            ProxyInfo proxyInfo = getProxyInfo( m_settings );
View Full Code Here

     * @param url repository url
     * @throws MojoExecutionException
     */
    public void connect( String id, String url ) throws MojoExecutionException
    {
        Repository repository = new Repository( id, url );

        try
        {
            m_wagon = m_wagonManager.getWagon( repository );
        }
        catch ( UnsupportedProtocolException e )
        {
            throw new MojoExecutionException( "Unsupported protocol: '" + repository.getProtocol() + "'", e );
        }
        catch ( WagonConfigurationException e )
        {
            throw new MojoExecutionException( "Unable to configure Wagon: '" + repository.getProtocol() + "'", e );
        }

        try
        {
            ProxyInfo proxyInfo = getProxyInfo( m_settings );
View Full Code Here

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

            repository.setProtocol( null );

            Wagon wagon = wagonManager.getWagon( repository );

            fail( "Expected :" + UnsupportedProtocolException.class.getName() );
        }
View Full Code Here

    }

    private void assertWagonRepository( String protocol )
        throws Exception
    {
        Repository repository = new Repository();

        String s = "value=" + protocol;

        repository.setId( "id=" + protocol );

        repository.setProtocol( protocol );

        Xpp3Dom conf = new Xpp3Dom( "configuration" );

        Xpp3Dom configurableField = new Xpp3Dom( "configurableField" );

        configurableField.setValue( s );

        conf.addChild( configurableField );

        wagonManager.addConfiguration( repository.getId(), conf );

        WagonMock wagon = (WagonMock) wagonManager.getWagon( repository );

        assertNotNull( "Check wagon, protocol=" + protocol, wagon );
View Full Code Here

        public TransferEventMock()
            throws ConnectionException, AuthenticationException
        {
            super( new FileWagon(), new Resource(), TransferEvent.TRANSFER_INITIATED, TransferEvent.REQUEST_GET );
            getResource().setContentLength( 100000 );
            Repository repository = new Repository();
            getWagon().connect( repository );
        }
View Full Code Here

        public TransferEventMock( Exception exception )
            throws ConnectionException, AuthenticationException
        {
            super( new FileWagon(), new Resource(), exception, TransferEvent.REQUEST_GET );
            getResource().setContentLength( 100000 );
            Repository repository = new Repository();
            getWagon().connect( repository );
        }
View Full Code Here

        }

        public void connect( final String id, final String url )
            throws IOException
        {
            Repository repository = new Repository( id, url );

            try
            {
                // wagon = wagonManager.getWagon( repository );
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.