Package org.apache.maven.plugins.invoker
Class InvokerMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.invoker.AbstractInvokerMojo
-
- org.apache.maven.plugins.invoker.InvokerMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="run", defaultPhase=INTEGRATION_TEST, requiresDependencyResolution=TEST, threadSafe=true) public class InvokerMojo extends AbstractInvokerMojoSearches for integration test Maven projects, and executes each, collecting a log in the project directory, and outputting the results to the command line.- Since:
- 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.maven.plugins.invoker.AbstractInvokerMojo
AbstractInvokerMojo.ToolchainPrivateManager
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.BooleanfailIfNoProjectsSet this totrueto cause a failure if there are no projects to invoke.private booleanignoreFailuresA flag controlling whether failures of the sub builds should fail the main build, too.private booleanstreamLogsOnFailuresSet totrueto output build.log to mojo log in case of failed jobs.-
Fields inherited from class org.apache.maven.plugins.invoker.AbstractInvokerMojo
suppressSummaries
-
-
Constructor Summary
Constructors Constructor Description InvokerMojo(org.apache.maven.shared.invoker.Invoker invoker, org.apache.maven.settings.building.SettingsBuilder settingsBuilder, org.apache.maven.toolchain.ToolchainManagerPrivate toolchainManagerPrivate, InterpolatorUtils interpolaterUtils)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoFailIfNoProjects()(package private) voidprocessResults(InvokerSession invokerSession)Processes the results of invoking the build jobs.-
Methods inherited from class org.apache.maven.plugins.invoker.AbstractInvokerMojo
alreadyCloned, buildInterpolatedFile, execute, getBuildJobs, getParallelThreadsCount
-
-
-
-
Field Detail
-
ignoreFailures
@Parameter(property="maven.test.failure.ignore", defaultValue="false") private boolean ignoreFailuresA flag controlling whether failures of the sub builds should fail the main build, too. If set totrue, the main build will proceed even if one or more sub builds failed.- Since:
- 1.3
-
failIfNoProjects
@Parameter(property="invoker.failIfNoProjects") private java.lang.Boolean failIfNoProjects
Set this totrueto cause a failure if there are no projects to invoke.- Since:
- 1.9
-
streamLogsOnFailures
@Parameter(property="invoker.streamLogsOnFailures", defaultValue="false") private boolean streamLogsOnFailuresSet totrueto output build.log to mojo log in case of failed jobs.- Since:
- 3.2.2
-
-
Constructor Detail
-
InvokerMojo
@Inject public InvokerMojo(org.apache.maven.shared.invoker.Invoker invoker, org.apache.maven.settings.building.SettingsBuilder settingsBuilder, org.apache.maven.toolchain.ToolchainManagerPrivate toolchainManagerPrivate, InterpolatorUtils interpolaterUtils)
-
-
Method Detail
-
processResults
void processResults(InvokerSession invokerSession) throws org.apache.maven.plugin.MojoFailureException
Description copied from class:AbstractInvokerMojoProcesses the results of invoking the build jobs.- Specified by:
processResultsin classAbstractInvokerMojo- Parameters:
invokerSession- The session with the build jobs, must not benull.- Throws:
org.apache.maven.plugin.MojoFailureException- If the mojo had failed as a result of invoking the build jobs.
-
doFailIfNoProjects
protected void doFailIfNoProjects() throws org.apache.maven.plugin.MojoFailureException- Overrides:
doFailIfNoProjectsin classAbstractInvokerMojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
-