Class VerifyMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.invoker.VerifyMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="verify", defaultPhase=VERIFY, threadSafe=true) public class VerifyMojo extends org.apache.maven.plugin.AbstractMojo
Checks the results of maven-invoker-plugin based integration tests and fails the build if any tests failed.
Since:
1.4
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Boolean
    Set this to true to cause a failure if there are no projects to invoke.
    private boolean
    A flag controlling whether failures of the sub builds should fail the main build, too.
    private File
    Base directory where all build reports are read from.
    private boolean
    Flag used to suppress certain invocations.
    private boolean
    Set to true to output build.log to mojo log in case of failed jobs.
    private boolean
    Flag used to suppress the summary output notifying of successes and failures.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invokes Maven on the configured test projects.

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • skipInvocation

      @Parameter(property="invoker.skip", defaultValue="false") private boolean skipInvocation
      Flag used to suppress certain invocations. This is useful in tailoring the build using profiles.
      Since:
      1.1
    • reportsDirectory

      @Parameter(property="invoker.reportsDirectory", defaultValue="${project.build.directory}/invoker-reports") private File reportsDirectory
      Base directory where all build reports are read from.
      Since:
      1.4
    • ignoreFailures

      @Parameter(property="maven.test.failure.ignore", defaultValue="false") private boolean ignoreFailures
      A flag controlling whether failures of the sub builds should fail the main build, too. If set to true, the main build will proceed even if one or more sub builds failed.
      Since:
      1.3
    • suppressSummaries

      @Parameter(defaultValue="false") private boolean suppressSummaries
      Flag used to suppress the summary output notifying of successes and failures. If set to true, the only indication of the build's success or failure will be the effect it has on the main build (if it fails, the main build should fail as well).
    • failIfNoProjects

      @Parameter(property="invoker.failIfNoProjects") private Boolean failIfNoProjects
      Set this to true to cause a failure if there are no projects to invoke.
      Since:
      1.9
    • streamLogsOnFailures

      @Parameter(property="invoker.streamLogsOnFailures", defaultValue="false") private boolean streamLogsOnFailures
      Set to true to output build.log to mojo log in case of failed jobs.
      Since:
      3.2.2
  • Constructor Details

    • VerifyMojo

      public VerifyMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Invokes Maven on the configured test projects.
      Throws:
      org.apache.maven.plugin.MojoExecutionException - If the goal encountered severe errors.
      org.apache.maven.plugin.MojoFailureException - If any of the Maven builds failed.