Package org.apache.maven.wagon

Examples of org.apache.maven.wagon.ResourceDoesNotExistException


                case HttpStatus.SC_FORBIDDEN:
                    fireSessionConnectionRefused();
                    throw new AuthorizationException( "Access denied to: " + url );

                case HttpStatus.SC_NOT_FOUND:
                    throw new ResourceDoesNotExistException( "File: " + url + " does not exist" );

                    //add more entries here
                default:
                {
                    TransferFailedException e = new TransferFailedException(
View Full Code Here


            case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
                fireSessionConnectionRefused();
                throw new AuthorizationException( "Not authorized by proxy." );

            case HttpStatus.SC_NOT_FOUND:
                throw new ResourceDoesNotExistException( "File: " + url + " does not exist" );

                // add more entries here
            default:
            {
                cleanupGetTransfer( resource );
View Full Code Here

            FileUtils.copyFile( new File( sourceFile ), file );
            assert( file.exists() );
        }
        catch( IOException e )
        {
            throw new ResourceDoesNotExistException( e.getMessage() );           
        }
    }
View Full Code Here

        fireGetInitiated( resource, destination );

        String data = (String) this.resourceStrings.get( resourceName );
        if ( data == null )
        {
            throw new ResourceDoesNotExistException( "Unexistent resource: " + resourceName );
        }

        fireGetStarted( resource, destination );
        try
        {
View Full Code Here

            inputData.setInputStream( new StringInputStream( content ) );
        }
        else
        {
            throw new ResourceDoesNotExistException( "No content provided for " + resource.getName() );
        }
    }
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

        File file = new File( getRepository().getBasedir(), resource.getName() );

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

        try
        {
            InputStream in = new FileInputStream( file );
View Full Code Here

       
        File path = resolveDestinationPath( destinationDirectory );

        if ( !path.exists() )
        {
            throw new ResourceDoesNotExistException( "Directory does not exist: " + destinationDirectory );
        }

        if ( !path.isDirectory() )
        {
            throw new ResourceDoesNotExistException( "Path is not a directory: " + destinationDirectory );
        }

        String files[] = path.list();

        return Arrays.asList( files );
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

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.