Package org.apache.maven.wagon

Examples of org.apache.maven.wagon.ConnectionException


    protected void openConnectionInternal()
        throws ConnectionException
    {
        if ( getRepository() == null )
        {
            throw new ConnectionException( "Unable to operate with a null repository." );
        }

        if ( getRepository().getBasedir() == null )
        {
            // This condition is possible when using wagon-file under integration testing conditions.
            fireSessionDebug( "Using a null basedir." );
            return;
        }

        // Check the File repository exists
        File basedir = new File( getRepository().getBasedir() );
        if ( !basedir.exists() )
        {
            if ( !basedir.mkdirs() )
            {
                throw new ConnectionException( "Repository path " + basedir + " does not exist,"
                                               + " and cannot be created." );
            }
        }

        if ( !basedir.canRead() )
        {
            throw new ConnectionException( "Repository path " + basedir + " cannot be read" );
        }
    }
View Full Code Here


    public void openConnection()
        throws ConnectionException
    {
        if ( getRepository() == null )
        {
            throw new ConnectionException( "Unable to operate with a null repository." );
        }

        if ( getRepository().getBasedir() == null )
        {
            // This condition is possible when using wagon-file under integration testing conditions.
            fireSessionDebug( "Using a null basedir." );
            return;
        }

        // Check the File repository exists
        File basedir = new File( getRepository().getBasedir() );
        if ( !basedir.exists() )
        {
            if ( !basedir.mkdirs() )
            {
                throw new ConnectionException( "Repository path " + basedir + " does not exist, and cannot be created." );
            }
        }

        if ( !basedir.canRead() )
        {
            throw new ConnectionException( "Repository path " + basedir + " cannot be read" );
        }
    }
View Full Code Here

                ftp.enterLocalPassiveMode();
            }
        }
        catch ( IOException e )
        {
            throw new ConnectionException( "Cannot login to remote system", e );
        }
    }
View Full Code Here

                // This is a NPE rethink shutting down the streams
                ftp.disconnect();
            }
            catch ( IOException e )
            {
                throw new ConnectionException( "Failed to close connection to FTP repository", e );
            }
        }
    }
View Full Code Here

        {
            FileUtils.deleteDirectory( checkoutDirectory );
        }
        catch ( IOException e )
        {
            throw new ConnectionException( "Unable to cleanup checkout directory", e );
        }
    }
View Full Code Here

      return; // Silently return.
    }
    try {
      FileUtils.deleteDirectory(checkoutDirectory);
    } catch (IOException e) {
      throw new ConnectionException("Unable to cleanup checkout directory", e);
    }
  }
View Full Code Here

    protected void openConnectionInternal()
        throws ConnectionException
    {
        if ( getRepository() == null )
        {
            throw new ConnectionException( "Unable to operate with a null repository." );
        }

        if ( getRepository().getBasedir() == null )
        {
            // This condition is possible when using wagon-file under integration testing conditions.
            fireSessionDebug( "Using a null basedir." );
            return;
        }

        // Check the File repository exists
        File basedir = new File( getRepository().getBasedir() );
        if ( !basedir.exists() )
        {
            if ( !basedir.mkdirs() )
            {
                throw new ConnectionException( "Repository path " + basedir + " does not exist,"
                                               + " and cannot be created." );
            }
        }

        if ( !basedir.canRead() )
        {
            throw new ConnectionException( "Repository path " + basedir + " cannot be read" );
        }
    }
View Full Code Here

        {
            FileUtils.deleteDirectory( checkoutDirectory );
        }
        catch ( IOException e )
        {
            throw new ConnectionException( "Unable to cleanup checkout directory", e );
        }
    }
View Full Code Here

                ftp.enterLocalPassiveMode();
            }
        }
        catch ( IOException e )
        {
            throw new ConnectionException( "Cannot login to remote system", e );
        }
    }
View Full Code Here

                // This is a NPE rethink shutting down the streams
                ftp.disconnect();
            }
            catch ( IOException e )
            {
                throw new ConnectionException( "Failed to close connection to FTP repository", e );
            }
        }
    }
View Full Code Here

TOP

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

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.