Package org.apache.maven.shared.release

Examples of org.apache.maven.shared.release.ReleaseResult


        return result;
    }

    public ReleaseResult clean( List<MavenProject> reactorProjects )
    {
        ReleaseResult result = new ReleaseResult();

        cleaned = true;

        result.setResultCode( ReleaseResult.SUCCESS );

        return result;
    }
View Full Code Here


        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );
       
        // execute
        ReleaseResult result = phase.execute( config, new DefaultReleaseEnvironment(), reactorProjects );
       
        BufferedReader reader = null;
        try
        {
            reader = new BufferedReader( new StringReader( result.getOutput() ) );
           
            assertEquals( "[INFO] Removing release POM for 'Unnamed - groupId:artifactId:jar:1.0-SNAPSHOT'..." , reader.readLine() );
            assertEquals( "Expected EOF",  null, reader.readLine() );
        }
        finally
View Full Code Here

        ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
        stub.setScmProvider( scmProviderMock );

        // execute
        ReleaseResult result = phase.simulate( config, new DefaultReleaseEnvironment(), reactorProjects );

        BufferedReader reader = null;
        try
        {
            reader = new BufferedReader( new StringReader( result.getOutput() ) );
           
            assertEquals( "[INFO] Removing release POM for 'Unnamed - groupId:artifactId:jar:1.0-SNAPSHOT'..." , reader.readLine() );
            assertEquals( "[INFO] Full run would be removing [" + reactorProjects.get( 0 ).getFile().getParent() + File.separator + "release-pom.xml]", reader.readLine() );
            assertEquals( "Expected EOF",  null, reader.readLine() );
        }
View Full Code Here

    public ReleaseResult execute( ReleaseDescriptor releaseDescriptor,
                                  ReleaseEnvironment releaseEnvironment,
                                  List<MavenProject> reactorProjects )
        throws ReleaseExecutionException, ReleaseFailureException
    {
        ReleaseResult result = new ReleaseResult();

        // if we stopped mid-way through preparation - don't perform
        if ( releaseDescriptor.getCompletedPhase() != null
             && !"end-release".equals( releaseDescriptor.getCompletedPhase() ) )
        {
            String message = "Cannot perform release - the preparation step was stopped mid-way. Please re-run "
                             + "release:prepare to continue, or perform the release from an SCM tag.";

            result.setResultCode( ReleaseResult.ERROR );

            logError( result, message );

            throw new ReleaseFailureException( message );
        }

        if ( releaseDescriptor.getScmSourceUrl() == null )
        {
            String message = "No SCM URL was provided to perform the release from";

            result.setResultCode( ReleaseResult.ERROR );

            logError( result, message );

            throw new ReleaseFailureException( message );
        }

        result.setResultCode( ReleaseResult.SUCCESS );

        return result;
    }
View Full Code Here

    private Set<Artifact> usedSnapshotPlugins = new HashSet<Artifact>();

    public ReleaseResult execute( ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<MavenProject> reactorProjects )
        throws ReleaseExecutionException, ReleaseFailureException
    {
        ReleaseResult result = new ReleaseResult();

        if ( !releaseDescriptor.isAllowTimestampedSnapshots() )
        {
            logInfo( result, "Checking dependencies and plugins for snapshots ..." );

            Map<String, String> originalVersions = releaseDescriptor.getOriginalVersions( reactorProjects );

            for ( MavenProject project : reactorProjects )
            {
                checkProject( project, originalVersions, releaseDescriptor );
            }
        }
        else
        {
            logInfo( result, "Ignoring SNAPSHOT depenedencies and plugins ..." );
        }
        result.setResultCode( ReleaseResult.SUCCESS );

        return result;
    }
View Full Code Here

    public ReleaseResult execute( ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment,
                                  List<MavenProject> reactorProjects )
        throws ReleaseExecutionException, ReleaseFailureException
    {
        ReleaseResult result = new ReleaseResult();

        for ( MavenProject project : reactorProjects )
        {
            restorePomBackup( releaseDescriptor, releaseEnvironment, project );
        }

        result.setResultCode( ReleaseResult.SUCCESS );

        return result;
    }
View Full Code Here

            additionalArguments = "-f " + pomFileName;
        }
       
        if ( simulate )
        {
            ReleaseResult result = new ReleaseResult();

            logDebug( result, "Additional arguments: " + additionalArguments );
           
            logInfo( result, "Executing perform goals  - since this is simulation mode these goals are skipped." );
           
View Full Code Here

    private ReleaseResult execute( ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment,
                                   List<MavenProject> reactorProjects, boolean simulate )
        throws ReleaseFailureException, ReleaseExecutionException
    {
        ReleaseResult result = new ReleaseResult();

        if ( releaseDescriptor.isGenerateReleasePoms() )
        {
            removeReleasePoms( releaseDescriptor, releaseEnvironment, simulate, result, reactorProjects );
        }
        else
        {
            logInfo( result, "Not removing release POMs" );
        }

        result.setResultCode( ReleaseResult.SUCCESS );

        return result;
    }
View Full Code Here

        getLogger().debug( message, e );
    }
   
    protected ReleaseResult getReleaseResultSuccess()
    {
        ReleaseResult result = new ReleaseResult();

        result.setResultCode( ReleaseResult.SUCCESS );

        return result;
    }
View Full Code Here

    public ReleaseResult simulate( ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment,
                                   List<MavenProject> reactorProjects )
        throws ReleaseExecutionException
    {
        ReleaseResult result = new ReleaseResult();

        logInfo( result, "Executing preparation goals - since this is simulation mode it is running against the "
            + "original project, not the rewritten ones" );

        execute( releaseDescriptor, releaseEnvironment, reactorProjects );
View Full Code Here

TOP

Related Classes of org.apache.maven.shared.release.ReleaseResult

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.