Package pl.project13.maven.validation
Class ValidationMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- pl.project13.maven.validation.ValidationMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="validateRevision", defaultPhase=VERIFY, threadSafe=true) public class ValidationMojo extends org.apache.maven.plugin.AbstractMojoThe git-commit-id-maven-plugin comes equipped with an additional validation utility which can be used to verify if your project properties are set as you would like to have them set. This feature ships with an additional mojo execution and for instance allows to check if the version is not a snapshot build. If you are interested in the config checkout the validation utility documentation.Each validation you may want to perform can be configured using a
ValidationProperty. Note: This configuration will only be taken into account when the additional goal `validateRevision` is configured inside an execution like so<plugin> <groupId>io.github.git-commit-id</groupId> <artifactId>git-commit-id-maven-plugin</artifactId> <executions> <execution> <id>validate-the-git-infos</id> <goals><goal>validateRevision</goal></goals> <phase>package</phase> </execution> </executions>- Since:
- 2.2.2
-
-
Constructor Summary
Constructors Constructor Description ValidationMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()voidsetValidationProperties(java.util.List<ValidationProperty> validationProperties)voidsetValidationShouldFailIfNoMatch(boolean validationShouldFailIfNoMatch)
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setValidationShouldFailIfNoMatch
public void setValidationShouldFailIfNoMatch(boolean validationShouldFailIfNoMatch)
-
setValidationProperties
public void setValidationProperties(java.util.List<ValidationProperty> validationProperties)
-
-