View Javadoc
1   package org.apache.maven.shared.invoker;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.File;
23  import java.io.InputStream;
24  import java.util.List;
25  import java.util.Map;
26  import java.util.Properties;
27  
28  /**
29   * Specifies the parameters used to control a Maven invocation.
30   * 
31   * @version $Id: InvocationRequest.java 1760179 2016-09-10 14:49:13Z khmarbaise $
32   */
33  public interface InvocationRequest
34  {
35  
36      /**
37       * By default, Maven is executed in batch mode. This mean no interaction with the Maven process can be done.
38       * 
39       * @return <code>true</code> if Maven should be executed in batch mode, <code>false</code> if Maven is executed in
40       *         interactive mode.
41       * @since 3.0.0
42       */
43      boolean isBatchMode();
44  
45      /**
46       * Gets the network mode of the Maven invocation. By default, Maven is executed in online mode.
47       * 
48       * @return <code>true</code> if Maven should be executed in offline mode, <code>false</code> if the online mode is
49       *         used.
50       */
51      boolean isOffline();
52  
53      /**
54       * Indicates whether Maven should enforce an update check for plugins and snapshots. By default, no update check is
55       * performed.
56       * 
57       * @return <code>true</code> if plugins and snapshots should be updated, <code>false</code> otherwise.
58       */
59      boolean isUpdateSnapshots();
60  
61      /**
62       * Gets the recursion behavior of a reactor invocation. By default, Maven will recursive the build into sub modules.
63       * 
64       * @return <code>true</code> if sub modules should be build, <code>false</code> otherwise.
65       */
66      boolean isRecursive();
67  
68      /**
69       * A list of specified reactor projects to build instead of all projects. A project can be specified by
70       * [groupId]:artifactId or by its relative path.
71       * 
72       * @return the list of projects to add to reactor build, otherwise {@code null}
73       * @since 2.1
74       */
75      List<String> getProjects();
76  
77      /**
78       * Get the value of the {@code also-make} argument.
79       * 
80       * @return {@code true} if the argument {@code also-make} was specified, otherwise {@code false}
81       * @since 2.1
82       */
83      boolean isAlsoMake();
84  
85      /**
86       * Get the value of the {@code also-make-dependents}
87       * 
88       * @return {@code true} if the argument {@code also-make-dependents} was specified, otherwise {@code false}
89       * @since 2.1
90       */
91      boolean isAlsoMakeDependents();
92  
93      /**
94       * Get the value of {@code resume-from}
95       * 
96       * @return specified reactor project to resume from
97       * @since 2.1
98       */
99      String getResumeFrom();
100 
101     /**
102      * Gets the debug mode of the Maven invocation. By default, Maven is executed in normal mode.
103      * 
104      * @return <code>true</code> if Maven should be executed in debug mode, <code>false</code> if the normal mode should
105      *         be used.
106      */
107     boolean isDebug();
108 
109     /**
110      * Gets the exception output mode of the Maven invocation. By default, Maven will not print stack traces of build
111      * exceptions.
112      * 
113      * @return <code>true</code> if Maven should print stack traces, <code>false</code> otherwise.
114      */
115     boolean isShowErrors();
116 
117     /**
118      * Indicates whether the environment variables of the current process should be propagated to the Maven invocation.
119      * By default, the current environment variables are inherited by the new Maven invocation.
120      * 
121      * @return <code>true</code> if the environment variables should be propagated, <code>false</code> otherwise.
122      */
123     boolean isShellEnvironmentInherited();
124 
125     /**
126      * Indicates whether Maven should check for plugin updates. By default, plugin updates are not suppressed.
127      * 
128      * @return <code>true</code> if plugin updates should be suppressed, <code>false</code> otherwise.
129      */
130     boolean isNonPluginUpdates();
131 
132     /**
133      * Gets the failure mode of the Maven invocation. By default, the mode {@link ReactorFailureBehavior#FailFast} is
134      * used.
135      * 
136      * @return The failure mode, one of {@link ReactorFailureBehavior#FailFast},
137      *         {@link ReactorFailureBehavior#FailAtEnd} and {@link ReactorFailureBehavior#FailNever}.
138      * @since 3.0.0
139      */
140     ReactorFailureBehavior getReactorFailureBehavior();
141 
142     /**
143      * Gets the path to the base directory of the local repository to use for the Maven invocation.
144      * 
145      * @param defaultDirectory The default location to use if no location is configured for this request, may be
146      *            <code>null</code>.
147      * @return The path to the base directory of the local repository or <code>null</code> to use the location from the
148      *         <code>settings.xml</code>.
149      */
150     File getLocalRepositoryDirectory( File defaultDirectory );
151 
152     /**
153      * Gets the input stream used to provide input for the invoked Maven build. This is in particular useful when
154      * invoking Maven in interactive mode.
155      * 
156      * @return The input stream used to provide input for the invoked Maven build or <code>null</code> if not set.
157      */
158     InputStream getInputStream( InputStream defaultStream );
159 
160     /**
161      * Gets the handler used to capture the standard output from the Maven build.
162      * 
163      * @return The output handler or <code>null</code> if not set.
164      */
165     InvocationOutputHandler getOutputHandler( InvocationOutputHandler defaultHandler );
166 
167     /**
168      * Gets the handler used to capture the error output from the Maven build.
169      * 
170      * @return The error handler or <code>null</code> if not set.
171      */
172     InvocationOutputHandler getErrorHandler( InvocationOutputHandler defaultHandler );
173 
174     /**
175      * Gets the path to the POM for the Maven invocation. If no base directory is set, the parent directory of this POM
176      * will be used as the working directory for the Maven invocation.
177      * 
178      * @return The path to the POM for the Maven invocation or <code>null</code> if not set.
179      */
180     File getPomFile();
181 
182     /**
183      * Gets the (unqualified) filename of the POM for the Maven invocation. This setting is ignored if
184      * {@link #getPomFile()} does not return <code>null</code>. Otherwise, the base directory is assumed to contain a
185      * POM with this name. By default, a file named <code>pom.xml</code> is used.
186      * 
187      * @return The (unqualified) filename of the POM for the Maven invocation or <code>null</code> if not set.
188      */
189     String getPomFileName();
190 
191     /**
192      * Gets the path to the base directory of the POM for the Maven invocation. If {@link #getPomFile()} does not return
193      * <code>null</code>, this setting only affects the working directory for the Maven invocation.
194      * 
195      * @return The path to the base directory of the POM or <code>null</code> if not set.
196      */
197     File getBaseDirectory();
198 
199     /**
200      * Gets the path to the base directory of the POM for the Maven invocation. If {@link #getPomFile()} does not return
201      * <code>null</code>, this setting only affects the working directory for the Maven invocation.
202      * 
203      * @param defaultDirectory The default base directory to use if none is configured for this request, may be
204      *            <code>null</code>.
205      * @return The path to the base directory of the POM or <code>null</code> if not set.
206      */
207     File getBaseDirectory( File defaultDirectory );
208 
209     /**
210      * Gets the path to the base directory of the Java installation used to run Maven.
211      * 
212      * @return The path to the base directory of the Java installation used to run Maven or <code>null</code> to use the
213      *         default Java home.
214      */
215     File getJavaHome();
216 
217     /**
218      * Gets the system properties for the Maven invocation.
219      * 
220      * @return The system properties for the Maven invocation or <code>null</code> if not set.
221      */
222     Properties getProperties();
223 
224     /**
225      * Gets the goals for the Maven invocation.
226      * 
227      * @return The goals for the Maven invocation or <code>null</code> if not set.
228      */
229     List<String> getGoals();
230 
231     /**
232      * Gets the path to the user settings for the Maven invocation.
233      * 
234      * @return The path to the user settings for the Maven invocation or <code>null</code> to load the user settings
235      *         from the default location.
236      */
237     File getUserSettingsFile();
238 
239     /**
240      * Gets the path to the global settings for the Maven invocation.
241      * 
242      * @return The path to the global settings for the Maven invocation or <code>null</code> to load the global settings
243      *         from the default location.
244      * @since 2.1
245      */
246     File getGlobalSettingsFile();
247 
248     /**
249      * Gets the path to the custom toolchains file
250      * 
251      * @return The path to the custom toolchains file or <code>null</code> to load the toolchains from the default
252      *         location
253      * @since 2.1
254      */
255     File getToolchainsFile();
256 
257     /**
258      * Alternate path for the global toolchains file <b>Note. This is available since Maven 3.3.1</b>
259      * 
260      * @return The path to the custom global toolchains file or <code>null</code> to load the global toolchains from the
261      *         default location.
262      * @since 3.0.0
263      */
264     File getGlobalToolchainsFile();
265 
266     /**
267      * Gets the checksum mode of the Maven invocation.
268      * 
269      * @return The checksum mode, one of {@link CheckSumPolicy#Warn} and {@link CheckSumPolicy#Fail}.
270      * @since 3.0.0
271      */
272     CheckSumPolicy getGlobalChecksumPolicy();
273 
274     /**
275      * Gets the profiles for the Maven invocation.
276      * 
277      * @return The profiles for the Maven invocation or <code>null</code> if not set.
278      */
279     List<String> getProfiles();
280 
281     /**
282      * Gets the environment variables for the Maven invocation.
283      * 
284      * @return The environment variables for the Maven invocation or <code>null</code> if not set.
285      */
286     Map<String, String> getShellEnvironments();
287 
288     /**
289      * Gets the value of the <code>MAVEN_OPTS</code> environment variable.
290      * 
291      * @return The value of the <code>MAVEN_OPTS</code> environment variable or <code>null</code> if not set.
292      */
293     String getMavenOpts();
294 
295     /**
296      * The show version behavior (-V option)
297      * 
298      * @return The show version behavior
299      * @since 2.0.11
300      */
301     boolean isShowVersion();
302 
303     /**
304      * Get the value of the {@code threads} argument.
305      * 
306      * @return the value of the {@code threads} argument or {@code null} if not set
307      * @since 2.1
308      */
309     String getThreads();
310 
311     // ----------------------------------------------------------------------
312     // Reactor Failure Mode
313     // ----------------------------------------------------------------------
314 
315     /**
316      * The reactor failure behavior which to be used during Maven invocation.
317      */
318     enum ReactorFailureBehavior
319     {
320         /**
321          * Stop at first failure in reactor builds
322          */
323         FailFast( "ff", "fail-fast" ),
324         /**
325          * Only fail the build afterwards. allow all non-impacted builds to continue.
326          */
327         FailAtEnd( "fae", "fail-at-end" ),
328         /**
329          * <b>NEVER</b> fail the build, regardless of project result
330          */
331         FailNever( "fn", "fail-never" );
332 
333         private String shortOption;
334 
335         private String longOption;
336 
337         private ReactorFailureBehavior( String shortOption, String longOption )
338         {
339             this.shortOption = shortOption;
340             this.longOption = longOption;
341         }
342 
343         public String getShortOption()
344         {
345             return this.shortOption;
346         }
347 
348         public String getLongOption()
349         {
350             return this.longOption;
351         }
352 
353         /**
354          * Returns the enumeration type which is related to the given long option.
355          * 
356          * @param longOption The type which is searched for.
357          * @return The appropriate {@link ReactorFailureBehavior}
358          * @throws IllegalArgumentException in case of an long option which does not exists.
359          */
360         public static ReactorFailureBehavior valueOfByLongOption( String longOption )
361         {
362             for ( ReactorFailureBehavior item : ReactorFailureBehavior.values() )
363             {
364                 if ( item.getLongOption().equals( longOption ) )
365                 {
366                     return item;
367                 }
368             }
369             throw new IllegalArgumentException( "The string '" + longOption
370                 + "' can not be converted to enumeration." );
371         }
372     };
373 
374     // ----------------------------------------------------------------------
375     // Artifact repository policies
376     // ----------------------------------------------------------------------
377 
378     /**
379      * The kind of checksum policy which should be used during Maven invocation.
380      */
381     enum CheckSumPolicy
382     {
383 
384         /**
385          * Strict checksum checking equivalent of {@code --strict-checksums}
386          */
387         Fail,
388         /**
389          * Warn checksum failures equivalent {@code --lax-checksums}.
390          */
391         Warn;
392 
393     }
394 
395     // ----------------------------------------------------------------------
396     //
397     // ----------------------------------------------------------------------
398 
399     /**
400      * Sets the interaction mode of the Maven invocation. Equivalent of {@code -B} and {@code --batch-mode}
401      * 
402      * @param batchMode <code>true</code> if Maven should be executed in non-interactive mode, <code>false</code> if the
403      *            interactive modes is used.
404      * @return This invocation request.
405      * @since 3.0.0
406      */
407     InvocationRequest setBatchMode( boolean batchMode );
408 
409     /**
410      * Sets the network mode of the Maven invocation. Equivalent of {@code -o} and {@code --offline}
411      * 
412      * @param offline <code>true</code> if Maven should be executed in offline mode, <code>false</code> if the online
413      *            mode is used.
414      * @return This invocation request.
415      */
416     InvocationRequest setOffline( boolean offline );
417 
418     /**
419      * Sets the debug mode of the Maven invocation. Equivalent of {@code -X} and {@code --debug}
420      * 
421      * @param debug <code>true</code> if Maven should be executed in debug mode, <code>false</code> if the normal mode
422      *            should be used.
423      * @return This invocation request.
424      */
425     InvocationRequest setDebug( boolean debug );
426 
427     /**
428      * Sets the exception output mode of the Maven invocation. Equivalent of {@code -e} and {@code --errors}
429      * 
430      * @param showErrors <code>true</code> if Maven should print stack traces, <code>false</code> otherwise.
431      * @return This invocation request.
432      */
433     InvocationRequest setShowErrors( boolean showErrors );
434 
435     /**
436      * Specifies whether Maven should enforce an update check for plugins and snapshots. Equivalent of {@code -U} and
437      * {@code --update-snapshots}
438      * 
439      * @param updateSnapshots <code>true</code> if plugins and snapshots should be updated, <code>false</code>
440      *            otherwise.
441      * @return This invocation request.
442      */
443     InvocationRequest setUpdateSnapshots( boolean updateSnapshots );
444 
445     /**
446      * Sets the failure mode of the Maven invocation. Equivalent of {@code -ff} and {@code --fail-fast}, {@code -fae}
447      * and {@code --fail-at-end}, {@code -fn} and {@code --fail-never}
448      * 
449      * @param failureBehavior The failure mode, must be one of {@link ReactorFailureBehavior#FailFast},
450      *            {@link ReactorFailureBehavior#FailAtEnd} and {@link ReactorFailureBehavior#FailNever}.
451      * @return This invocation request.
452      * @since 3.0.0
453      */
454     InvocationRequest setReactorFailureBehavior( ReactorFailureBehavior failureBehavior );
455 
456     /**
457      * Sets the path to the base directory of the local repository to use for the Maven invocation.
458      * 
459      * @param localRepository The path to the base directory of the local repository, may be <code>null</code>.
460      * @return This invocation request.
461      */
462     InvocationRequest setLocalRepositoryDirectory( File localRepository );
463 
464     /**
465      * Sets the input stream used to provide input for the invoked Maven build. This is in particular useful when
466      * invoking Maven in interactive mode.
467      * 
468      * @param inputStream The input stream used to provide input for the invoked Maven build, may be <code>null</code>
469      *            if not required.
470      * @return This invocation request.
471      */
472     InvocationRequest setInputStream( InputStream inputStream );
473 
474     /**
475      * Sets the handler used to capture the standard output from the Maven build.
476      * 
477      * @param outputHandler The output handler, may be <code>null</code> if the output is not of interest.
478      * @return This invocation request.
479      */
480     InvocationRequest setOutputHandler( InvocationOutputHandler outputHandler );
481 
482     /**
483      * Sets the handler used to capture the error output from the Maven build.
484      * 
485      * @param errorHandler The error handler, may be <code>null</code> if the output is not of interest.
486      * @return This invocation request.
487      */
488     InvocationRequest setErrorHandler( InvocationOutputHandler errorHandler );
489 
490     /**
491      * Sets the path to the POM for the Maven invocation. If no base directory is set, the parent directory of this POM
492      * will be used as the working directory for the Maven invocation.
493      * 
494      * @param pomFile The path to the POM for the Maven invocation, may be <code>null</code> if not used.
495      * @return This invocation request.
496      */
497     InvocationRequest setPomFile( File pomFile );
498 
499     /**
500      * Sets the (unqualified) filename of the POM for the Maven invocation. This setting is ignored if
501      * {@link #getPomFile()} does not return <code>null</code>. Otherwise, the base directory is assumed to contain a
502      * POM with this name.
503      * 
504      * @param pomFilename The (unqualified) filename of the POM for the Maven invocation, may be <code>null</code> if
505      *            not used.
506      * @return This invocation request.
507      */
508     InvocationRequest setPomFileName( String pomFilename );
509 
510     /**
511      * Sets the path to the base directory of the POM for the Maven invocation. If {@link #getPomFile()} does not return
512      * <code>null</code>, this setting only affects the working directory for the Maven invocation.
513      * 
514      * @param basedir The path to the base directory of the POM, may be <code>null</code> if not used.
515      * @return This invocation request.
516      */
517     InvocationRequest setBaseDirectory( File basedir );
518 
519     /**
520      * Sets the path to the base directory of the Java installation used to run Maven.
521      * 
522      * @param javaHome The path to the base directory of the Java installation used to run Maven, may be
523      *            <code>null</code> to use the default Java home.
524      * @return This invocation request.
525      */
526     InvocationRequest setJavaHome( File javaHome );
527 
528     /**
529      * Sets the system properties for the Maven invocation.
530      * 
531      * @param properties The system properties for the Maven invocation, may be <code>null</code> if not set.
532      * @return This invocation request.
533      */
534     InvocationRequest setProperties( Properties properties );
535 
536     /**
537      * Sets the goals for the Maven invocation.
538      * 
539      * @param goals The goals for the Maven invocation, may be <code>null</code> to execute the POMs default goal.
540      * @return This invocation request.
541      */
542     InvocationRequest setGoals( List<String> goals );
543 
544     /**
545      * Sets the profiles for the Maven invocation. Equivalent of {@code -P} and {@code --active-profiles}
546      * 
547      * @param profiles The profiles for the Maven invocation, may be <code>null</code> to use the default profiles.
548      * @return This invocation request.
549      */
550     InvocationRequest setProfiles( List<String> profiles );
551 
552     /**
553      * Specifies whether the environment variables of the current process should be propagated to the Maven invocation.
554      * 
555      * @param shellEnvironmentInherited <code>true</code> if the environment variables should be propagated,
556      *            <code>false</code> otherwise.
557      * @return This invocation request.
558      */
559     InvocationRequest setShellEnvironmentInherited( boolean shellEnvironmentInherited );
560 
561     /**
562      * Sets the path to the user settings for the Maven invocation. Equivalent of {@code -s} and {@code --settings}
563      * 
564      * @param userSettings The path to the user settings for the Maven invocation, may be <code>null</code> to load the
565      *            user settings from the default location.
566      * @return This invocation request.
567      */
568     InvocationRequest setUserSettingsFile( File userSettings );
569 
570     /**
571      * Sets the path to the global settings for the Maven invocation. Equivalent of {@code -gs} and
572      * {@code --global-settings}
573      * 
574      * @param globalSettings The path to the global settings for the Maven invocation, may be <code>null</code> to load
575      *            the global settings from the default location.
576      * @return This invocation request.
577      * @since 2.1
578      */
579     InvocationRequest setGlobalSettingsFile( File globalSettings );
580 
581     /**
582      * Sets the alternate path for the user toolchains file Equivalent of {@code -t} or {@code --toolchains}
583      * 
584      * @param toolchains the alternate path for the user toolchains file
585      * @return This invocation request
586      * @since 2.1
587      */
588     InvocationRequest setToolchainsFile( File toolchains );
589 
590     /**
591      * Sets the alternate path for the global toolchains file Equivalent of {@code -gt} or {@code --global-toolchains}
592      * 
593      * @param toolchains the alternate path for the global toolchains file
594      * @return This invocation request
595      * @since 3.0.0
596      */
597     InvocationRequest setGlobalToolchainsFile( File toolchains );
598 
599     /**
600      * Sets the checksum mode of the Maven invocation. Equivalent of {@code -c} or {@code --lax-checksums}, {@code -C}
601      * or {@code --strict-checksums}
602      * 
603      * @param globalChecksumPolicy The checksum mode, must be one of {@link CheckSumPolicy#Warn} and
604      *            {@link CheckSumPolicy#Fail}.
605      * @return This invocation request.
606      * @since 3.0.0
607      */
608     InvocationRequest setGlobalChecksumPolicy( CheckSumPolicy globalChecksumPolicy );
609 
610     /**
611      * Specifies whether Maven should check for plugin updates.
612      * <p>
613      * Equivalent of {@code -npu} or {@code --no-plugin-updates}<br/>
614      * <strong>note: </strong>Ineffective with Maven3, only kept for backward compatibility
615      * </p>
616      * 
617      * @param nonPluginUpdates <code>true</code> if plugin updates should be suppressed, <code>false</code> otherwise.
618      * @return This invocation request.
619      */
620     InvocationRequest setNonPluginUpdates( boolean nonPluginUpdates );
621 
622     /**
623      * Sets the recursion behavior of a reactor invocation. <em>Inverse</em> equivalent of {@code -N} and
624      * {@code --non-recursive}
625      * 
626      * @param recursive <code>true</code> if sub modules should be build, <code>false</code> otherwise.
627      * @return This invocation request.
628      */
629     InvocationRequest setRecursive( boolean recursive );
630 
631     /**
632      * Adds the specified environment variable to the Maven invocation.
633      * 
634      * @param name The name of the environment variable, must not be <code>null</code>.
635      * @param value The value of the environment variable, must not be <code>null</code>.
636      * @return This invocation request.
637      */
638     InvocationRequest addShellEnvironment( String name, String value );
639 
640     /**
641      * Sets the value of the <code>MAVEN_OPTS</code> environment variable.
642      * 
643      * @param mavenOpts The value of the <code>MAVEN_OPTS</code> environment variable, may be <code>null</code> to use
644      *            the default options.
645      * @return This invocation request.
646      */
647     InvocationRequest setMavenOpts( String mavenOpts );
648 
649     /**
650      * enable displaying version without stopping the build Equivalent of {@code -V} or {@code --show-version}
651      * 
652      * @param showVersion enable displaying version
653      * @return This invocation request.
654      * @since 2.0.11
655      */
656     InvocationRequest setShowVersion( boolean showVersion );
657 
658     /**
659      * Thread count, for instance 2.0C where C is core multiplied Equivalent of {@code -T} or {@code --threads}
660      * <p>
661      * <strong>note: </strong>available since Maven3
662      * </p>
663      * 
664      * @param threads the threadcount
665      * @return This invocation request.
666      * @since 2.1
667      */
668     InvocationRequest setThreads( String threads );
669 
670     /**
671      * Sets the reactor project list. Equivalent of {@code -pl} or {@code --projects}
672      * 
673      * @param projects the reactor project list
674      * @return This invocation request.
675      * @since 2.1
676      */
677     InvocationRequest setProjects( List<String> projects );
678 
679     /**
680      * Enable the 'also make' mode. Equivalent of {@code -am} or {@code --also-make}
681      * 
682      * @param alsoMake enable 'also make' mode
683      * @return This invocation request.
684      * @since 2.1
685      */
686     InvocationRequest setAlsoMake( boolean alsoMake );
687 
688     /**
689      * Enable the 'also make dependents' mode. Equivalent of {@code -amd} or {@code --also-make-dependents}
690      * 
691      * @param alsoMakeDependents enable 'also make' mode
692      * @return This invocation request.
693      * @since 2.1
694      */
695     InvocationRequest setAlsoMakeDependents( boolean alsoMakeDependents );
696 
697     /**
698      * Resume reactor from specified project. Equivalent of {@code -rf} or {@code --resume-from}
699      * 
700      * @param resumeFrom set the project to resume from
701      * @return This invocation request
702      * @since 2.1
703      */
704     InvocationRequest setResumeFrom( String resumeFrom );
705 
706     /**
707      * The id of the build strategy to use. equivalent of {@code --builder id}. <b>Note. This is available since Maven
708      * 3.2.1</b>
709      * 
710      * @param id The builder id.
711      * @return {@link InvocationRequest} FIXME: How to identify if this is a valid command line option?
712      * @since 3.0.0
713      */
714     InvocationRequest setBuilder( String id );
715 
716     /**
717      * Get the current set builder strategy id equivalent of {@code --builder id}. <b>Note. This is available since
718      * Maven 3.2.1</b>
719      * 
720      * @return The current set builder id.
721      * @since 3.0.0
722      */
723     String getBuilder();
724 
725 }