Examples of DefaultInvocationRequest


Examples of org.apache.maven.shared.invoker.DefaultInvocationRequest

        throws Exception
    {
        Properties props = new Properties();
        InvokerProperties facade = new InvokerProperties( props );

        InvocationRequest request = new DefaultInvocationRequest();

        request.setGoals( Collections.singletonList( "test" ) );
        facade.configureInvocation( request, 0 );
        assertEquals( Collections.singletonList( "test" ), request.getGoals() );

        props.setProperty( "invoker.goals", "verify" );
        facade.configureInvocation( request, 0 );
        assertEquals( Collections.singletonList( "verify" ), request.getGoals() );

        props.setProperty( "invoker.goals", "   " );
        facade.configureInvocation( request, 0 );
        assertEquals( Arrays.asList( new String[0] ), request.getGoals() );

        props.setProperty( "invoker.goals", "  clean , test   verify  " );
        facade.configureInvocation( request, 0 );
        assertEquals( Arrays.asList( new String[] { "clean", "test", "verify" } ), request.getGoals() );

        props.setProperty( "invoker.goals", "" );
        facade.configureInvocation( request, 0 );
        assertEquals( Arrays.asList( new String[0] ), request.getGoals() );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.