Skip to content

Commit

Permalink
[MSHARED-1008] Set builder id in proper way
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Dec 29, 2021
1 parent 4d21af1 commit 2a1e609
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Expand Up @@ -717,11 +717,11 @@ enum CheckSumPolicy
InvocationRequest setResumeFrom( String resumeFrom );

/**
* The id of the build strategy to use. equivalent of {@code --builder id}. <b>Note. This is available since Maven
* 3.2.1</b>
* The id of the build strategy to use. equivalent of {@code -b id} or {@code --builder id}.
* <b>Note. This is available since Maven 3.2.1</b>
*
* @param id The builder id.
* @return {@link InvocationRequest} FIXME: How to identify if this is a valid command line option?
* @return {@link InvocationRequest}
* @since 3.0.0
*/
InvocationRequest setBuilder( String id );
Expand Down
Expand Up @@ -573,6 +573,7 @@ else if ( CheckSumPolicy.Warn.equals( checksumPolicy ) )

if ( request.getBuilder() != null )
{
cli.createArg().setValue( "-b" );
cli.createArg().setValue( request.getBuilder() );
}

Expand Down
Expand Up @@ -345,6 +345,14 @@ public void testDebugOptionShouldMaskShowErrorsOption()
assertArgumentsNotPresent( cli, Collections.singleton( "-e" ) );
}

@Test
public void testShouldSetBuilderIdOptionsFromRequest()
{
mclb.setFlags( newRequest().setBuilder( "builder-id-123" ), cli );

assertArgumentsPresentInOrder( cli, "-b", "builder-id-123" );
}

@Test
public void testAlsoMake()
{
Expand Down

0 comments on commit 2a1e609

Please sign in to comment.