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