Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHARED-1008] Set builder id in proper way #33

Merged
merged 1 commit into from Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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