@@ -132,12 +132,16 @@ public abstract class AbstractInvokerMojo
132
132
* only indication of the build's success or failure will be the effect it has on the main build (if it fails, the
133
133
* main build should fail as well). If {@link #streamLogs} is enabled, the sub-build summary will also provide an
134
134
* indication.
135
+ *
136
+ * @since 1.0
135
137
*/
136
138
@ Parameter ( defaultValue = "false" )
137
139
protected boolean suppressSummaries ;
138
140
139
141
/**
140
142
* Flag used to determine whether the build logs should be output to the normal mojo log.
143
+ *
144
+ * @since 1.0
141
145
*/
142
146
@ Parameter ( property = "invoker.streamLogs" , defaultValue = "false" )
143
147
private boolean streamLogs ;
@@ -146,12 +150,16 @@ public abstract class AbstractInvokerMojo
146
150
* The local repository for caching artifacts. It is strongly recommended to specify a path to an isolated
147
151
* repository like <code>${project.build.directory}/it-repo</code>. Otherwise, your ordinary local repository will
148
152
* be used, potentially soiling it with broken artifacts.
153
+ *
154
+ * @since 1.0
149
155
*/
150
156
@ Parameter ( property = "invoker.localRepositoryPath" , defaultValue = "${settings.localRepository}" )
151
157
private File localRepositoryPath ;
152
158
153
159
/**
154
160
* Directory to search for integration tests.
161
+ *
162
+ * @since 1.0
155
163
*/
156
164
@ Parameter ( property = "invoker.projectsDirectory" , defaultValue = "${basedir}/src/it/" )
157
165
private File projectsDirectory ;
@@ -211,6 +219,8 @@ public abstract class AbstractInvokerMojo
211
219
212
220
/**
213
221
* A single POM to build, skipping any scanning parameters and behavior.
222
+ *
223
+ * @since 1.0
214
224
*/
215
225
@ Parameter ( property = "invoker.pom" )
216
226
private File pom ;
@@ -224,6 +234,8 @@ public abstract class AbstractInvokerMojo
224
234
* pattern <code>*</code> will run Maven builds on all immediate sub directories of {@link #projectsDirectory},
225
235
* regardless if they contain a <code>pom.xml</code>. This allows to perform builds that need/should not depend on
226
236
* the existence of a POM.
237
+ *
238
+ * @since 1.0
227
239
*/
228
240
@ Parameter
229
241
private List <String > pomIncludes = Collections .singletonList ( "*/pom.xml" );
@@ -232,6 +244,8 @@ public abstract class AbstractInvokerMojo
232
244
* Exclude patterns for searching the integration test directory. This parameter is meant to be set from the POM. By
233
245
* default, no POM files are excluded. For the convenience of using an include pattern like <code>*</code>, the
234
246
* custom settings file specified by the parameter {@link #settingsFile} will always be excluded automatically.
247
+ *
248
+ * @since 1.0
235
249
*/
236
250
@ Parameter
237
251
private List <String > pomExcludes = Collections .emptyList ();
@@ -250,21 +264,12 @@ public abstract class AbstractInvokerMojo
250
264
251
265
/**
252
266
* The list of goals to execute on each project. Default value is: <code>package</code>.
267
+ *
268
+ * @since 1.0
253
269
*/
254
270
@ Parameter
255
271
private List <String > goals = Collections .singletonList ( "package" );
256
272
257
- /**
258
- */
259
- @ Component
260
- private Invoker invoker ;
261
-
262
- @ Component
263
- private SettingsBuilder settingsBuilder ;
264
-
265
- @ Component
266
- private ToolchainManagerPrivate toolchainManagerPrivate ;
267
-
268
273
/**
269
274
* Relative path of a selector script to run prior in order to decide if the build should be executed. This script
270
275
* may be written with either BeanShell or Groovy. If the file extension is omitted (e.g. <code>selector</code>),
@@ -287,6 +292,8 @@ public abstract class AbstractInvokerMojo
287
292
* script exists for a particular project but returns any non-null value different from <code>true</code> or throws
288
293
* an exception, the corresponding build is flagged as a failure. In this case, neither Maven nor the post-build
289
294
* hook script will be invoked.
295
+ *
296
+ * @since 1.0
290
297
*/
291
298
@ Parameter ( property = "invoker.preBuildHookScript" , defaultValue = "prebuild" )
292
299
private String preBuildHookScript ;
@@ -297,12 +304,16 @@ public abstract class AbstractInvokerMojo
297
304
* plugin searches for the file by trying out the well-known extensions <code>.bsh</code> and <code>.groovy</code>.
298
305
* If this script exists for a particular project but returns any non-null value different from <code>true</code> or
299
306
* throws an exception, the corresponding build is flagged as a failure.
307
+ *
308
+ * @since 1.0
300
309
*/
301
310
@ Parameter ( property = "invoker.postBuildHookScript" , defaultValue = "postbuild" )
302
311
private String postBuildHookScript ;
303
312
304
313
/**
305
314
* Location of a properties file that defines CLI properties for the test.
315
+ *
316
+ * @since 1.0
306
317
*/
307
318
@ Parameter ( property = "invoker.testPropertiesFile" , defaultValue = "test.properties" )
308
319
private String testPropertiesFile ;
@@ -317,18 +328,24 @@ public abstract class AbstractInvokerMojo
317
328
318
329
/**
319
330
* Whether to show errors in the build output.
331
+ *
332
+ * @since 1.0
320
333
*/
321
334
@ Parameter ( property = "invoker.showErrors" , defaultValue = "false" )
322
335
private boolean showErrors ;
323
336
324
337
/**
325
338
* Whether to show debug statements in the build output.
339
+ *
340
+ * @since 1.0
326
341
*/
327
342
@ Parameter ( property = "invoker.debug" , defaultValue = "false" )
328
343
private boolean debug ;
329
344
330
345
/**
331
346
* Suppress logging to the <code>build.log</code> file.
347
+ *
348
+ * @since 1.0
332
349
*/
333
350
@ Parameter ( property = "invoker.noLog" , defaultValue = "false" )
334
351
private boolean noLog ;
@@ -358,20 +375,6 @@ public abstract class AbstractInvokerMojo
358
375
@ Parameter
359
376
private Map <String , String > filterProperties ;
360
377
361
- /**
362
- * The Maven Project Object
363
- *
364
- * @since 1.1
365
- */
366
- @ Parameter ( defaultValue = "${project}" , readonly = true , required = true )
367
- private MavenProject project ;
368
-
369
- @ Parameter ( defaultValue = "${session}" , readonly = true , required = true )
370
- private MavenSession session ;
371
-
372
- @ Parameter ( defaultValue = "${mojoExecution}" , readonly = true , required = true )
373
- private MojoExecution mojoExecution ;
374
-
375
378
/**
376
379
* A comma separated list of projectname patterns to run. Specify this parameter to run individual tests by file
377
380
* name, overriding the {@link #setupIncludes}, {@link #pomIncludes} and {@link #pomExcludes} parameters. Each
@@ -440,14 +443,6 @@ public abstract class AbstractInvokerMojo
440
443
@ Parameter ( property = "encoding" , defaultValue = "${project.build.sourceEncoding}" )
441
444
private String encoding ;
442
445
443
- /**
444
- * The current user system settings for use in Maven.
445
- *
446
- * @since 1.2
447
- */
448
- @ Parameter ( defaultValue = "${settings}" , readonly = true , required = true )
449
- private Settings settings ;
450
-
451
446
/**
452
447
* A flag whether the test class path of the project under test should be included in the class path of the
453
448
* pre-/post-build scripts. If set to <code>false</code>, the class path of script interpreter consists only of the
@@ -460,12 +455,6 @@ public abstract class AbstractInvokerMojo
460
455
@ Parameter ( property = "invoker.addTestClassPath" , defaultValue = "false" )
461
456
private boolean addTestClassPath ;
462
457
463
- /**
464
- * The test class path of the project under test.
465
- */
466
- @ Parameter ( defaultValue = "${project.testClasspathElements}" , readonly = true )
467
- private List <String > testClassPath ;
468
-
469
458
/**
470
459
* The name of an optional project-specific file that contains properties used to specify settings for an individual
471
460
* Maven invocation. Any property present in the file will override the corresponding setting from the plugin
@@ -620,12 +609,6 @@ public abstract class AbstractInvokerMojo
620
609
@ Parameter ( property = "invoker.parallelThreads" , defaultValue = "1" )
621
610
private String parallelThreads ;
622
611
623
- /**
624
- * @since 1.6
625
- */
626
- @ Parameter ( property = "plugin.artifacts" , required = true , readonly = true )
627
- private List <Artifact > pluginArtifacts ;
628
-
629
612
/**
630
613
* If enable and if you have a settings file configured for the execution, it will be merged with your user
631
614
* settings.
@@ -681,6 +664,8 @@ public abstract class AbstractInvokerMojo
681
664
@ Parameter ( defaultValue = "false" , property = "invoker.updateOnly" )
682
665
private boolean updateOnly = false ;
683
666
667
+ // internal state variables
668
+
684
669
/**
685
670
* The scripter runner that is responsible to execute hook scripts.
686
671
*/
@@ -703,6 +688,35 @@ public abstract class AbstractInvokerMojo
703
688
*/
704
689
private String actualMavenVersion ;
705
690
691
+ // used components - readonly parameters
692
+
693
+ @ Parameter ( property = "plugin.artifacts" , required = true , readonly = true )
694
+ private List <Artifact > pluginArtifacts ;
695
+
696
+ @ Parameter ( defaultValue = "${project.testClasspathElements}" , readonly = true )
697
+ private List <String > testClassPath ;
698
+
699
+ @ Parameter ( defaultValue = "${mojoExecution}" , readonly = true , required = true )
700
+ private MojoExecution mojoExecution ;
701
+
702
+ @ Parameter ( defaultValue = "${project}" , readonly = true , required = true )
703
+ private MavenProject project ;
704
+
705
+ @ Parameter ( defaultValue = "${session}" , readonly = true , required = true )
706
+ private MavenSession session ;
707
+
708
+ @ Parameter ( defaultValue = "${settings}" , readonly = true , required = true )
709
+ private Settings settings ;
710
+
711
+ @ Component
712
+ private Invoker invoker ;
713
+
714
+ @ Component
715
+ private SettingsBuilder settingsBuilder ;
716
+
717
+ @ Component
718
+ private ToolchainManagerPrivate toolchainManagerPrivate ;
719
+
706
720
/**
707
721
* Invokes Maven on the configured test projects.
708
722
*
0 commit comments