Package org.apache.maven.wagon

Examples of org.apache.maven.wagon.ResourceDoesNotExistException


        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


                break;
            }
        }
        catch ( MalformedURLException e )
        {
            throw new ResourceDoesNotExistException( "Invalid repository URL: " + e.getMessage(), e );
        }
        catch ( FileNotFoundException e )
        {
            throw new ResourceDoesNotExistException( "Unable to locate resource in repository", e );
        }
        catch ( IOException e )
        {
            StringBuilder message = new StringBuilder( "Error transferring file: " );
            message.append( e.getMessage() );
View Full Code Here

                case HttpURLConnection.HTTP_FORBIDDEN:
                    throw new AuthorizationException( "Access denied to: " + buildUrl( resource.getName() ) );

                case HttpURLConnection.HTTP_NOT_FOUND:
                    throw new ResourceDoesNotExistException(
                        "File: " + buildUrl( resource.getName() ) + " does not exist" );

                    // add more entries here
                default:
                    throw new TransferFailedException(
View Full Code Here

                    return dirs;
                }

                if ( status == HttpStatus.SC_NOT_FOUND )
                {
                    throw new ResourceDoesNotExistException( "Destination directory does not exist: " + url );
                }
            }
        }
        catch ( DavException e )
        {
            throw new TransferFailedException( e.getMessage(), e );
        }
        catch ( IOException e )
        {
            throw new TransferFailedException( e.getMessage(), e );
        }
        finally
        {
            if ( method != null )
            {
                method.releaseConnection();
            }
        }
        throw new ResourceDoesNotExistException(
            "Destination path exists but is not a " + "WebDAV collection (directory): " + url );
    }
View Full Code Here

                    case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
                        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:
                        throw new TransferFailedException(
                            "Failed to transfer file: " + url + ". Return code is: " + statusCode );
View Full Code Here

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

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

                        //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 " + reasonPhrase );

                case HttpStatus.SC_NOT_FOUND:
                    throw new ResourceDoesNotExistException( "File: " + url + " " + reasonPhrase );

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

        }
        catch ( SftpException e )
        {
            if ( e.toString().trim().endsWith( "No such file" ) )
            {
                throw new ResourceDoesNotExistException( e.toString(), e );
            }
            else if ( e.toString().trim().indexOf( "Can't change directory" ) != -1 )
            {
                throw new ResourceDoesNotExistException( e.toString(), e );
            }  
            else
            {
                throw e;
            }
View Full Code Here

            if ( exitCode != COPY_START_CHAR )
            {
                if ( exitCode == 1 && ( line.indexOf( "No such file or directory" ) != -1
                    || line.indexOf( "no such file or directory" ) != 1 ) )
                {
                    throw new ResourceDoesNotExistException( line );
                }
                else
                {
                    throw new IOException( "Exit code: " + exitCode + " - " + line );
                }
View Full Code Here

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

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

                    //add more entries here
                default:
                {
                    TransferFailedException e = new TransferFailedException(
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.