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

Examples of org.apache.maven.scm.provider.local.command.add.LocalAddCommand


            }
        }
        else
        {
            // add the directory, but not commit
            LocalAddCommand addCmd = new LocalAddCommand();
            addCmd.setLogger( getLogger() );

            CommandParameters parameters = new CommandParameters();
            parameters.setString( CommandParameter.MESSAGE, message );
            parameters.setString( CommandParameter.BINARY, "false" );

            String path = ( (File) fileSet.getFileList().get( 0 ) ).getPath();
            if ( repo.isFileAdded( path ) )
            {
                return new MkdirScmResult( null, "Directory already exists!", "Directory already exists.", false );
            }

            AddScmResult result = (AddScmResult) addCmd.execute( repository, fileSet, parameters );
            createdDirs.addAll( result.getAddedFiles() );
        }

        return new MkdirScmResult( null, createdDirs );
    }
View Full Code Here


    /** {@inheritDoc} */
    public AddScmResult add( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
        throws ScmException
    {
        LocalAddCommand command = new LocalAddCommand();

        command.setLogger( getLogger() );

        return (AddScmResult) command.execute( repository, fileSet, parameters );
    }
View Full Code Here

            }
        }
        else
        {
            // add the directory, but not commit
            LocalAddCommand addCmd = new LocalAddCommand();
            addCmd.setLogger( getLogger() );

            CommandParameters parameters = new CommandParameters();
            parameters.setString( CommandParameter.MESSAGE, message );
            parameters.setString( CommandParameter.BINARY, "false" );

            String path = ( (File) fileSet.getFileList().get( 0 ) ).getPath();
            if ( repo.isFileAdded( path ) )
            {
                return new MkdirScmResult( null, "Directory already exists!", "Directory already exists.", false );
            }

            AddScmResult result = (AddScmResult) addCmd.execute( repository, fileSet, parameters );
            createdDirs.addAll( result.getAddedFiles() );
        }

        return new MkdirScmResult( null, createdDirs );
    }
View Full Code Here

    /** {@inheritDoc} */
    public AddScmResult add( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
        throws ScmException
    {
        LocalAddCommand command = new LocalAddCommand();

        command.setLogger( getLogger() );

        return (AddScmResult) command.execute( repository, fileSet, parameters );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.local.command.add.LocalAddCommand

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.