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.AbstractMojo
The 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
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()voidsetValidationProperties(List<ValidationProperty> validationProperties) voidsetValidationShouldFailIfNoMatch(boolean validationShouldFailIfNoMatch) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
ValidationMojo
public ValidationMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setValidationShouldFailIfNoMatch
public void setValidationShouldFailIfNoMatch(boolean validationShouldFailIfNoMatch) -
setValidationProperties
-