Package org.apache.maven.scm.command.add

Examples of org.apache.maven.scm.command.add.AddScmResult


            throw new ScmException( "Error while executing command.", ex );
        }

        if ( exitCode != 0 )
        {
            return new AddScmResult( cl.toString(), "The svn command failed.", stderr.getOutput(), false );
        }

        return new AddScmResult( cl.toString(), consumer.getAddedFiles() );
    }
View Full Code Here


            int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );

            if ( exitCode != 0 )
            {
                return new AddScmResult( cl.toString(), "The starteam command failed.", stderr.getOutput(), false );
            }
        }

        return new AddScmResult( null, consumer.getAddedFiles() );
    }
View Full Code Here

        createBarJava( barJava );

        changeReadmeTxt( readmeTxt );

        AddScmResult addResult = getScmManager().add( getScmRepository(), new ScmFileSet( getWorkingCopy(),
                                                                                          "src/main/java/Foo.java",
                                                                                          null ) );

        assertResultIsSuccess( addResult );
View Full Code Here

        createBarJava( barJava );

        changeReadmeTxt( readmeTxt );

        AddScmResult addResult = getScmManager().getProviderByUrl( getScmUrl() )
            .add( getScmRepository(), new ScmFileSet( getWorkingCopy(), "src/main/java/Foo.java", null ) );

        assertResultIsSuccess( addResult );

        CheckInScmResult result = getScmManager().checkIn( getScmRepository(),
View Full Code Here

        }

        // TODO: actually it may have partially succeeded - should we cvs update the files and parse "A " responses?
        if ( exitCode != 0 )
        {
            return new AddScmResult( cl.toString(), "The cvs command failed.", stderr.getOutput(), false );
        }

        return new AddScmResult( cl.toString(), addedFiles );
    }
View Full Code Here

            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return new AddScmResult( cl.toString(), consumer.getAdditions() );
    }
View Full Code Here

        if ( exitCode != 0 )
        {
            return new ChangeLogScmResult( cl.toString(), "The vss command failed.", stderr.getOutput(), false );
        }

        return new AddScmResult( cl.toString(), consumer.getAddedFiles() );
    }
View Full Code Here

        {
            try
            {
                ScmFileSet fileSet = new ScmFileSet( checkoutDirectory, relativized );
                getLog().debug( "scm add directory: " + relativized );
                AddScmResult addDirResult = scmProvider.add( scmRepository, fileSet, "Adding directory" );
                if ( !addDirResult.isSuccess() )
                {
                    getLog().debug( " Error adding directory " + relativized + ": " + addDirResult.getCommandOutput() );
                }
            }
            catch ( ScmException e )
            {
                //
View Full Code Here

        File scmFile = new File( basedir, scmFilePath );

        if ( scmFilePath.length() != 0 )
        {
            AddScmResult result = scmProvider.add( scmRepository, new ScmFileSet( basedir, new File( scmFilePath ) ) );

            /*
             * TODO dirty fix to work around files with property svn:eol-style=native if a file has that property, first
             * time file is added it fails, second time it succeeds the solution is check if the scm provider is svn and
             * unset that property when the SCM API allows it
             */
            if ( !result.isSuccess() )
            {
                result = scmProvider.add( scmRepository, new ScmFileSet( basedir, new File( scmFilePath ) ) );
            }

            addedFiles = result.getAddedFiles().size();
        }

        String reservedScmFile = scmProvider.getScmSpecificFilename();

        if ( scmFile.isDirectory() )
View Full Code Here

            {
                try
                {
                    ScmFileSet fileSet = new ScmFileSet( checkoutDirectory, relativized );
                    getLog().info( "scm add directory: " + relativized );
                    AddScmResult addDirResult = scmProvider.add( scmRepository, fileSet, "Adding directory" );
                    if ( !addDirResult.isSuccess() )
                    {
                        getLog().warn( " Error adding directory " + relativized + ": " + addDirResult.getCommandOutput() );
                    }
                }
                catch ( ScmException e )
                {
                    //
                }
            }
        }
        else
        { // add all directories in one command
            try
            {
                List<File> dirs = new ArrayList<File>( dirsToAdd );
                ScmFileSet fileSet = new ScmFileSet( checkoutDirectory, dirs );
                getLog().info( "scm add directories: " + dirs );
                AddScmResult addDirResult = scmProvider.add( scmRepository, fileSet, "Adding directories" );
                if ( !addDirResult.isSuccess() )
                {
                    getLog().warn( " Error adding directories " + dirs + ": " + addDirResult.getCommandOutput() );
                }
            }
            catch ( ScmException e )
            {
                //
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.command.add.AddScmResult

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.