Class ValidateFilesMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="validate-files",
          defaultPhase=PROCESS_TEST_SOURCES,
          requiresDependencyResolution=COMPILE,
          threadSafe=true)
    public class ValidateFilesMojo
    extends AbstractValidateMojo
    Validates individual files with all registered validators. This is only active for incremental builds (i.e. inside m2e) or when mojo "validate-package" is not executed in the current Maven execution.

    This goal is executed/bound by default for Maven modules of type content-package.

    Since:
    1.1.0
    See Also:
    Validators
    • Field Detail

      • classifier

        @Parameter(property="vault.classifier")
        protected String classifier
        If given validates files built for the given classifier. This modifies the workDirectory and appends the suffix -<classifier> to it.
      • excludes

        @Parameter(property="vault.excludes",
                   defaultValue="**/.vlt,**/.vltignore",
                   required=true)
        protected String[] excludes
        The file name patterns to exclude in addition to the ones listed in AbstractScanner.DEFAULTEXCLUDES. The format of each pattern is described in DirectoryScanner. The comparison is against the path relative to the according filter root. Since this is hardly predictable it is recommended to use only filename/directory name patterns here but not take into account file system hierarchies!

        Each value is either a regex pattern if enclosed within %regex[ and ], otherwise an Ant pattern.

      • lifecycleExecutor

        @Component
        protected org.apache.maven.lifecycle.LifecycleExecutor lifecycleExecutor
    • Constructor Detail

      • ValidateFilesMojo

        public ValidateFilesMojo()
    • Method Detail

      • shouldSkip

        protected boolean shouldSkip()
        Overrides:
        shouldSkip in class AbstractValidateMojo
        Returns:
        true to skip execution of the mojo. Default is false.
      • doExecute

        public void doExecute​(ValidationMessagePrinter validationHelper)
                       throws org.apache.maven.plugin.MojoExecutionException,
                              org.apache.maven.plugin.MojoFailureException
        Specified by:
        doExecute in class AbstractValidateMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException