Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmException


                int addedFiles = addFiles( scmProvider, scmRepository, newCheckoutDirectory,
                                           source.isDirectory() ? "" : scmFile.getName() );

                if ( !fileAlreadyInScm && addedFiles == 0 )
                {
                    throw new ScmException(
                        "Unable to add file to SCM: " + scmFile + "; see error messages above for more information" );
                }
            }

            ScmResult result =
View Full Code Here


    private void checkScmResult( ScmResult result )
        throws ScmException
    {
        if ( !result.isSuccess() )
        {
            throw new ScmException(
                "Unable to commit file. " + result.getProviderMessage() + " " + ( result.getCommandOutput() == null
                    ? ""
                    : result.getCommandOutput() ) );
        }
    }
View Full Code Here

    protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
                                                          ScmVersion startVersion, ScmVersion endVersion,
                                                          String datePattern )
        throws ScmException
    {
        throw new ScmException( "Unsupported method for this provider." );
    }
View Full Code Here

        }
        else
        {
            if ( numDays != 0 && ( startDate != null || endDate != null ) )
            {
                throw new ScmException( "Start or end date cannot be set if num days is set." );
            }

            if ( endDate != null && startDate == null )
            {
                throw new ScmException( "The end date is set but the start date isn't." );
            }

            if ( numDays > 0 )
            {
                int day = 24 * 60 * 60 * 1000;
 
View Full Code Here

    {
        LoginScmResult result = login( repository.getProviderRepository(), fileSet, new CommandParameters() );

        if ( !result.isSuccess() )
        {
            throw new ScmException( "Can't login.\n" + result.getCommandOutput() );
        }
    }
View Full Code Here

                                                      String message, ScmVersion scmVersion )
        throws ScmException
    {
        if ( scmVersion != null && StringUtils.isNotEmpty( scmVersion.getName() ) )
        {
            throw new ScmException( "This provider command can't handle tags." );
        }

        if ( getLogger().isDebugEnabled() )
        {
            getLogger().debug( "Executing checkin command..." );
View Full Code Here

            {
                boolean success = workingDir.mkdirs();
                if ( !success )
                {
                    String msg = "Working directory did not exist" + " and it couldn't be created: " + workingDir;
                    throw new ScmException( msg );
                }
            }
        }
        return cmd;
    }
View Full Code Here

        {
            exitCode = CommandLineUtils.executeCommandLine( cmd, consumer, consumer );
        }
        catch ( CommandLineException ex )
        {
            throw new ScmException( "Command could not be executed: " + cmd, ex );
        }
        return exitCode;
    }
View Full Code Here

                                                          String datePattern )
        throws ScmException
    {
        if ( branch != null && StringUtils.isNotEmpty( branch.getName() ) )
        {
            throw new ScmException( "This SCM doesn't support branches." );
        }

        return executeChangeLogCommand( repo, fileSet, startDate, endDate, branch, datePattern, null, null );
    }
View Full Code Here

            return exitcode;
        }
        catch ( CommandLineException ex )
        {
            throw new ScmException( "Error while executing command.", ex );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.ScmException

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.