Package pl.project13.maven.validation
Class ValidationProperty
java.lang.Object
pl.project13.maven.validation.ValidationProperty
Allows to configure a single validation action that shall be performed
when running the
ValidationMojo.
A full configuration may like:
<validationProperties>
<validationProperty>
<name>validating project version</name>
<value>${project.version}</value>
<shouldMatchTo><![CDATA[^.*(?<!-SNAPSHOT)$]]></shouldMatchTo>
</validationProperty>
</validationProperties>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()getValue()voidSets a descriptive name that will be used to be able to identify the validation that does not match up (will be displayed in the error message).voidsetShouldMatchTo(String shouldMatchTo) Sets the expectation what the given value should match to.voidSets the value that needs to be validated.
-
Constructor Details
-
ValidationProperty
public ValidationProperty()
-
-
Method Details
-
setName
Sets a descriptive name that will be used to be able to identify the validation that does not match up (will be displayed in the error message).- Parameters:
name- The name that shall be used to identify the validation
-
setValue
Sets the value that needs to be validated.- Parameters:
value- The value that needs to be validated.
-
setShouldMatchTo
Sets the expectation what the given value should match to.- Parameters:
shouldMatchTo- The expectation what the given value should match to.
-
getName
- Returns:
- A descriptive name that will be used to be able to identify the validation that does not match up (will be displayed in the error message).
-
getValue
- Returns:
- The value that needs to be validated.
-
getShouldMatchTo
- Returns:
- The expectation what the given value should match to.
-