Package org.apache.maven.shared.release.exec

Examples of org.apache.maven.shared.release.exec.MavenExecutorException


            int result = CommandLineUtils.executeCommandLine( cl, stdOut, stdErr );

            if ( result != 0 )
            {
                throw new MavenExecutorException( "Maven execution failed, exit code: \'" + result + "\'", result,
                                                  stdOut.toString(), stdErr.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            throw new MavenExecutorException( "Can't run goal " + goals, stdOut.toString(), stdErr.toString(), e );
        }
        finally
        {
            relResult.appendOutput( stdOut.toString() );
        }
View Full Code Here


        config.setPerformGoals( "goal1 goal2" );
        config.setCheckoutDirectory( testFile.getAbsolutePath() );

        MavenExecutor mock = mock( MavenExecutor.class );

        doThrow( new MavenExecutorException( "...", new Exception() ) ).when( mock ).executeGoals( eq( testFile ),
                                                                                                   eq( "goal1 goal2" ),
                                                                                                   isA( ReleaseEnvironment.class ),
                                                                                                   eq( true ),
                                                                                                   eq( "-DperformRelease=true -f pom.xml" ),
                                                                                                   isNull( String.class ),
View Full Code Here

        ReleaseDescriptor config = new ReleaseDescriptor();
        config.setCompletionGoals( "clean integration-test" );
        config.setWorkingDirectory( testFile.getAbsolutePath() );

        MavenExecutor mock = mock( MavenExecutor.class );
        doThrow( new MavenExecutorException( "...", new Exception() ) ).when( mock ).executeGoals( eq( testFile ),
                                 eq( "clean integration-test" ),
                                 isA( ReleaseEnvironment.class ),
                                 eq( true ),
                                 isNull( String.class ),
                                 isNull( String.class ),
View Full Code Here

        ReleaseDescriptor config = new ReleaseDescriptor();
        config.setCompletionGoals( "clean integration-test" );
        config.setWorkingDirectory( testFile.getAbsolutePath() );

        MavenExecutor mock = mock( MavenExecutor.class );
        doThrow( new MavenExecutorException( "...", new Exception() ) ).when( mock ).executeGoals( eq( testFile ),
                                                                                                   eq( "clean integration-test" ),
                                                                                                   isA( ReleaseEnvironment.class ),
                                                                                                   eq( true ),
                                                                                                   isNull( String.class ),
                                                                                                   isNull( String.class ),
View Full Code Here

        ReleaseDescriptor config = new ReleaseDescriptor();
        config.setPreparationGoals( "clean integration-test" );
        config.setWorkingDirectory( testFile.getAbsolutePath() );

        MavenExecutor mock = mock( MavenExecutor.class );
        doThrow( new MavenExecutorException( "...", new Exception() ) ).when( mock ).executeGoals( eq( testFile ),
                                                                                                   eq( "clean integration-test" ),
                                                                                                   isA( ReleaseEnvironment.class ),
                                                                                                   eq( true ),
                                                                                                   isNull( String.class ),
                                                                                                   isNull( String.class ),
View Full Code Here

        ReleaseDescriptor config = new ReleaseDescriptor();
        config.setPreparationGoals( "clean integration-test" );
        config.setWorkingDirectory( testFile.getAbsolutePath() );

        MavenExecutor mock = mock( MavenExecutor.class );
        doThrow( new MavenExecutorException( "...", new Exception() ) ).when( mock ).executeGoals( eq( testFile ),
                                                                                                   eq( "clean integration-test" ),
                                                                                                   isA( ReleaseEnvironment.class ),
                                                                                                   eq( true ),
                                                                                                   isNull( String.class ),
                                                                                                   isNull( String.class ),
View Full Code Here

            int result = CommandLineUtils.executeCommandLine( cl, stdOut, stdErr );

            if ( result != 0 )
            {
                throw new MavenExecutorException( "Maven execution failed, exit code: \'" + result + "\'", result,
                                                  stdOut.toString(), stdErr.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            throw new MavenExecutorException( "Can't run goal " + goals, stdOut.toString(), stdErr.toString(), e );
        }
        finally
        {
            relResult.appendOutput( stdOut.toString() );
        }
View Full Code Here

        int result = CommandLineUtils.executeCommandLine( cl, stdOut, stdErr );

        if ( result != 0 )
        {
            throw new MavenExecutorException( "Maven execution failed, exit code: \'" + result + "\'", result,
                                              stdOut.toString(), stdErr.toString() );
        }
        }
        catch ( CommandLineException e )
        {
            throw new MavenExecutorException( "Can't run goal " + goals, stdOut.toString(), stdErr.toString(), e );
        }
        finally
        {
            relResult.appendOutput( stdOut.toString() );
        }
View Full Code Here

            new IsEqual( "-DperformRelease=true -f pom.xml" ),
            new IsAnything()
        };

        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( constraints ).will(
            new ThrowStub( new MavenExecutorException( "...", new Exception() ) ) );

        phase.setMavenExecutor(ReleaseEnvironment.DEFAULT_MAVEN_EXECUTOR_ID, (MavenExecutor) mock.proxy() );

        try
        {
View Full Code Here

        Mock mock = new Mock( MavenExecutor.class );
        Constraint[] constraints = new Constraint[]{new IsEqual( testFile ), new IsEqual( "clean integration-test" ),
            new IsAnything(), new IsEqual( Boolean.TRUE ), new IsNull(), new IsAnything()};
        mock.expects( new InvokeOnceMatcher() ).method( "executeGoals" ).with( constraints ).will(
            new ThrowStub( new MavenExecutorException( "...", new Exception() ) ) );

        phase.setMavenExecutor( (MavenExecutor) mock.proxy() );

        try
        {
View Full Code Here

TOP

Related Classes of org.apache.maven.shared.release.exec.MavenExecutorException

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.