Class 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 java.lang.Boolean failIfNoProjects
      Set this to true to cause a failure if there are no projects to invoke.
      private boolean ignoreFailures
      A flag controlling whether failures of the sub builds should fail the main build, too.
      private java.io.File reportsDirectory
      Base directory where all build reports are read from.
      private boolean skipInvocation
      Flag used to suppress certain invocations.
      private boolean suppressSummaries
      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
      VerifyMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      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 Detail

      • 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 java.io.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 java.lang.Boolean failIfNoProjects
        Set this to true to cause a failure if there are no projects to invoke.
        Since:
        1.9
    • Constructor Detail

      • VerifyMojo

        public VerifyMojo()
    • Method Detail

      • 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.