Class ValidateFilesMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractValidateMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.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 AbstractValidateMojoValidates 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 Summary
Fields Modifier and Type Field Description protected booleanaddDefaultExcludesBy default certain metadata files are excluded which means they will not be copied into the package.protected StringclassifierIf given validates files built for the given classifier.protected String[]excludesThe file name patterns to exclude in addition to the ones listed inAbstractScanner.DEFAULTEXCLUDES.protected org.apache.maven.lifecycle.LifecycleExecutorlifecycleExecutor-
Fields inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractValidateMojo
buildContext, csvReportFile, dependencies, failOnValidationWarnings, IGNORE_ARTIFACT, IGNORE_GAV, mapPackageDependencyToMavenGa, mojoExecution, project, repositoryStructurePackages, repositorySystem, resolver, session, validationExecutorFactory
-
-
Constructor Summary
Constructors Constructor Description ValidateFilesMojo(org.eclipse.aether.RepositorySystem repositorySystem, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.lifecycle.LifecycleExecutor lifecycleExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoExecute(ValidationMessagePrinter validationHelper)protected booleanshouldSkip()-
Methods inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractValidateMojo
execute, getEffectiveValidatorSettingsForPackage, getEffectiveValidatorSettingsForPackage, getProjectRelativeFilePath, getRelativeFilePath
-
-
-
-
Field Detail
-
classifier
@Parameter(property="vault.classifier") protected String classifier
If given validates files built for the given classifier. This modifies theworkDirectoryand appends the suffix-<classifier>to it.
-
excludes
@Parameter(property="vault.excludes", defaultValue="**/.vlt,**/.vltignore,**/.gitignore,**/.gitattributes", required=true) protected String[] excludesThe file name patterns to exclude in addition to the ones listed inAbstractScanner.DEFAULTEXCLUDES. The format of each pattern is described inDirectoryScanner. 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.
-
addDefaultExcludes
@Parameter(defaultValue="true") protected boolean addDefaultExcludes
By default certain metadata files are excluded which means they will not be copied into the package. If you need them for a particular reason you can do that by setting this parameter tofalse. This means all files matching the following Ant patterns won't be copied by default.- Misc: **/*~, **/#*#, **/.#*, **/%*%, **/._*
- CVS: **/CVS, **/CVS/**, **/.cvsignore
- SVN: **/.svn, **/.svn/**
- GNU: **/.arch-ids, **/.arch-ids/**
- Bazaar: **/.bzr, **/.bzr/**
- SurroundSCM: **/.MySCMServerInfo
- Mac: **/.DS_Store
- Serena Dimension: **/.metadata, **/.metadata/**
- Mercurial: **/.hg, **/.hg/**
- GIT: **/.git, **/.git/**
- Bitkeeper: **/BitKeeper, **/BitKeeper/**, **/ChangeSet, **/ChangeSet/**
- Darcs: **/_darcs, **/_darcs/**, **/.darcsrepo, **/.darcsrepo/****/-darcs-backup*, **/.darcs-temp-mail
- Since:
- 1.3.4
- See Also:
AbstractScanner.DEFAULTEXCLUDES
-
lifecycleExecutor
protected final org.apache.maven.lifecycle.LifecycleExecutor lifecycleExecutor
-
-
Method Detail
-
shouldSkip
protected boolean shouldSkip()
- Overrides:
shouldSkipin classAbstractValidateMojo- Returns:
trueto skip execution of the mojo. Default isfalse.
-
doExecute
public void doExecute(ValidationMessagePrinter validationHelper) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Specified by:
doExecutein classAbstractValidateMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
-