Package org.apache.maven.scm

Examples of org.apache.maven.scm.CommandParameters


        GitScmTestUtils.initRepo( "src/test/resources/git/info", getRepositoryRoot(), getWorkingCopy() );
        ScmProvider provider = getScmManager().getProviderByUrl( getScmUrl() );
        ScmProviderRepository repository = provider.makeProviderScmRepository( getRepositoryRoot() );
        assertNotNull( repository );
        InfoScmResult result =
            provider.info( repository, new ScmFileSet( getRepositoryRoot() ), new CommandParameters() );
        assertNotNull( result );
        assertEquals( "cd3c0dfacb65955e6fbb35c56cc5b1bf8ce4f767", result.getInfoItems().get( 0 ).getRevision() );
        //
    }
View Full Code Here


    {
        GitScmTestUtils.initRepo( "src/test/resources/git/info", getRepositoryRoot(), getWorkingCopy() );
        ScmProvider provider = getScmManager().getProviderByUrl( getScmUrl() );
        ScmProviderRepository repository = provider.makeProviderScmRepository( getRepositoryRoot() );
        assertNotNull( repository );
        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setInt( CommandParameter.SCM_SHORT_REVISION_LENGTH, 6 );
        InfoScmResult result = provider.info( repository, new ScmFileSet( getRepositoryRoot() ), commandParameters );
        assertNotNull( result );
        assertEquals( "revision must be short, exactly 6 digits ", "cd3c0d",
                      result.getInfoItems().get( 0 ).getRevision() );
    }
View Full Code Here

    {
        GitScmTestUtils.initRepo( "src/test/resources/git/info", getRepositoryRoot(), getWorkingCopy() );
        ScmProvider provider = getScmManager().getProviderByUrl( getScmUrl() );
        ScmProviderRepository repository = provider.makeProviderScmRepository( getRepositoryRoot() );
        assertNotNull( repository );
        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setInt( CommandParameter.SCM_SHORT_REVISION_LENGTH, GitInfoCommand.NO_REVISION_LENGTH );
        InfoScmResult result = provider.info( repository, new ScmFileSet( getRepositoryRoot() ), commandParameters );
        assertNotNull( result );
        assertEquals( "revision should not be short", "cd3c0dfacb65955e6fbb35c56cc5b1bf8ce4f767",
                      result.getInfoItems().get( 0 ).getRevision() );
    }
View Full Code Here

    {
        GitScmTestUtils.initRepo( "src/test/resources/git/info", getRepositoryRoot(), getWorkingCopy() );
        ScmProvider provider = getScmManager().getProviderByUrl( getScmUrl() );
        ScmProviderRepository repository = provider.makeProviderScmRepository( getRepositoryRoot() );
        assertNotNull( repository );
        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setInt( CommandParameter.SCM_SHORT_REVISION_LENGTH, 0 );
        InfoScmResult result = provider.info( repository, new ScmFileSet( getRepositoryRoot() ), commandParameters );
        assertNotNull( result );
        assertTrue( "revision should be not empty, minimum 4 (see git help rev-parse --short)",
                    result.getInfoItems().get( 0 ).getRevision().length() >= 4 );
    }
View Full Code Here

    public StatusScmResult status( ScmRepository repository, ScmFileSet fileSet )
        throws ScmException
    {
        login( repository, fileSet );

        CommandParameters parameters = new CommandParameters();

        return status( repository.getProviderRepository(), fileSet, parameters );
    }
View Full Code Here

    public TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, String message )
        throws ScmException
    {
        login( repository, fileSet );

        CommandParameters parameters = new CommandParameters();

        parameters.setString( CommandParameter.TAG_NAME, tagName );

        if ( StringUtils.isNotEmpty( message ) )
        {
            parameters.setString( CommandParameter.MESSAGE, message );
        }

        ScmTagParameters scmTagParameters = new ScmTagParameters( message );

        parameters.setScmTagParameters( CommandParameter.SCM_TAG_PARAMETERS, scmTagParameters );

        return tag( repository.getProviderRepository(), fileSet, parameters );
    }
View Full Code Here

                             ScmTagParameters scmTagParameters )
        throws ScmException
    {
        login( repository, fileSet );

        CommandParameters parameters = new CommandParameters();

        parameters.setString( CommandParameter.TAG_NAME, tagName );

        parameters.setScmTagParameters( CommandParameter.SCM_TAG_PARAMETERS, scmTagParameters );

        return tag( repository.getProviderRepository(), fileSet, parameters );
    }
View Full Code Here

    public UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet )
        throws ScmException
    {
        login( repository, fileSet );

        CommandParameters parameters = new CommandParameters();

        return unedit( repository.getProviderRepository(), fileSet, parameters );
    }
View Full Code Here

                                    String datePattern, boolean runChangelog )
        throws ScmException
    {
        login( repository, fileSet );

        CommandParameters parameters = new CommandParameters();

        parameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion );

        parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );

        parameters.setString( CommandParameter.RUN_CHANGELOG_WITH_UPDATE, String.valueOf( runChangelog ) );

        return update( repository.getProviderRepository(), fileSet, parameters );
    }
View Full Code Here

                                   String datePattern )
        throws ScmException
    {
        login( repository, fileSet );

        CommandParameters parameters = new CommandParameters();

        parameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion );

        if ( lastUpdate != null )
        {
            parameters.setDate( CommandParameter.START_DATE, lastUpdate );
        }

        parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );

        parameters.setString( CommandParameter.RUN_CHANGELOG_WITH_UPDATE, "true" );

        return update( repository.getProviderRepository(), fileSet, parameters );
    }
View Full Code Here

TOP

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

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.