diff --git a/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java b/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java
index d65af9a..91c98d3 100644
--- a/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java
+++ b/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java
@@ -717,11 +717,11 @@ enum CheckSumPolicy
InvocationRequest setResumeFrom( String resumeFrom );
/**
- * The id of the build strategy to use. equivalent of {@code --builder id}. Note. This is available since Maven
- * 3.2.1
+ * The id of the build strategy to use. equivalent of {@code -b id} or {@code --builder id}.
+ * Note. This is available since Maven 3.2.1
*
* @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 );
diff --git a/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java b/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
index d4aee47..205ed05 100644
--- a/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
+++ b/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
@@ -573,6 +573,7 @@ else if ( CheckSumPolicy.Warn.equals( checksumPolicy ) )
if ( request.getBuilder() != null )
{
+ cli.createArg().setValue( "-b" );
cli.createArg().setValue( request.getBuilder() );
}
diff --git a/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java b/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
index 90cd25e..32fcdc6 100644
--- a/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
+++ b/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
@@ -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()
{