Package org.apache.maven.wagon

Examples of org.apache.maven.wagon.ResourceDoesNotExistException


        // Configure Repository (usually done within archiva.xml configuration)
        saveRemoteRepositoryConfig( "badproxied", "Bad Proxied", "test://bad.machine.com/repo/", "default" );

        wagonMock.get( EasyMock.eq( path), EasyMock.anyObject( File.class ) );
        EasyMock.expectLastCall().andThrow( new ResourceDoesNotExistException( "transfer failed" )  );
        wagonMockControl.replay();

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_DEFAULT_MANAGED, "badproxied", false );
        saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2, false );
View Full Code Here


        saveConnector( ID_DEFAULT_MANAGED, "badproxied2", false );

        File tmpFile = new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" );

        wagonMock.get( EasyMock.eq( path ), EasyMock.anyObject( File.class ) );
        EasyMock.expectLastCall().andThrow( new ResourceDoesNotExistException( "Can't find resource." ) );

        wagonMock.get( EasyMock.eq( path ), EasyMock.anyObject( File.class ) );
        EasyMock.expectLastCall().andThrow( new ResourceDoesNotExistException( "Can't find resource." ) );

        wagonMockControl.replay();

        File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
View Full Code Here

        }

        // if it already exists locally we were just trying to force it - ignore the update
        if ( !successful && !artifact.getFile().exists() )
        {
            throw new ResourceDoesNotExistException( "Unable to download the artifact from any repository" );
        }
    }
View Full Code Here

        if ( downloaded )
        {
            if ( !temp.exists() )
            {
                throw new ResourceDoesNotExistException( "Downloaded file does not exist: " + temp );
            }

            // The temporary file is named destination + ".tmp" and is done this way to ensure
            // that the temporary file is in the same file system as the destination because the
            // File.renameTo operation doesn't really work across file systems.
View Full Code Here

        wagonMock.get( path, new File( expectedFile.getAbsolutePath() + ".tmp" ) );
        wagonMockControl.setVoidCallable();
        wagonMock.get( path + ".sha1", new File( expectedFile.getAbsolutePath() + ".sha1.tmp" ) );
        wagonMockControl.setVoidCallable();
        wagonMock.get( path + ".md5", new File( expectedFile.getAbsolutePath() + ".md5.tmp" ) );
        wagonMockControl.setThrowable( new ResourceDoesNotExistException( "Resource does not exist." ) );
        wagonMockControl.replay();

        File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );

        wagonMockControl.verify();
View Full Code Here

                       SnapshotsPolicy.IGNORED, CachedFailuresPolicy.CACHED );
        saveConnector( ID_DEFAULT_MANAGED, "badproxied2", ChecksumPolicy.FIX, ReleasesPolicy.IGNORED,
                       SnapshotsPolicy.IGNORED, CachedFailuresPolicy.CACHED );

        wagonMock.get( path, new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" ) );
        wagonMockControl.setThrowable( new ResourceDoesNotExistException( "resource does not exist." ), 2 );

        wagonMockControl.replay();

        File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
View Full Code Here

                       SnapshotsPolicy.IGNORED, CachedFailuresPolicy.IGNORED );
        saveConnector( ID_DEFAULT_MANAGED, "badproxied2", ChecksumPolicy.FIX, ReleasesPolicy.IGNORED,
                       SnapshotsPolicy.IGNORED, CachedFailuresPolicy.IGNORED );

        wagonMock.get( path, new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" ) );
        wagonMockControl.setThrowable( new ResourceDoesNotExistException( "resource does not exist." ), 2 );

        wagonMockControl.replay();

        File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
View Full Code Here

        // Configure Repository (usually done within archiva.xml configuration)
        saveRemoteRepositoryConfig( "badproxied", "Bad Proxied", "test://bad.machine.com/repo/", "default" );

        wagonMock.get( path, new File( expectedFile.getAbsolutePath() + ".tmp" ) );
        wagonMockControl.setThrowable( new ResourceDoesNotExistException( "transfer failed" ) );
        wagonMockControl.replay();

        // Configure Connector (usually done within archiva.xml configuration)
        saveConnector( ID_DEFAULT_MANAGED, "badproxied" );
        saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED2 );
View Full Code Here

        saveConnector( ID_DEFAULT_MANAGED, "badproxied1" );
        saveConnector( ID_DEFAULT_MANAGED, "badproxied2" );

        File tmpFile = new File( expectedFile.getParentFile(), expectedFile.getName() + ".tmp" );
        wagonMock.get( path, tmpFile );
        wagonMockControl.setThrowable( new ResourceDoesNotExistException( "Can't find resource." ) );

        wagonMock.get( path, tmpFile );
        wagonMockControl.setThrowable( new ResourceDoesNotExistException( "Can't find resource." ) );

        wagonMockControl.replay();

        File downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository, artifact );
View Full Code Here

                        + "Resolution will not be reattempted until the update interval of " + repository.getId()
                        + " has elapsed or updates are forced. Original error: " + error );
                }
                else
                {
                    throw new ResourceDoesNotExistException( "Failure to resolve " + remotePath + " from "
                        + repository.getUrl() + " was cached in the local repository. "
                        + "Resolution will not be reattempted until the update interval of " + repository.getId()
                        + " has elapsed or updates are forced." );
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.maven.wagon.ResourceDoesNotExistException

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.