This repository has been archived by the owner on May 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mahesh Subramanian
committed
Feb 8, 2019
1 parent
5164fd6
commit 3b0a67d
Showing
5 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,47 @@ | ||
# Annotation Validator Maven Plugin | ||
|
||
TODO | ||
This project contains a plugin for validating annotations. | ||
Currently, it has two purposes (and they are optionally controlled): | ||
|
||
- _**Report generation**_ - the plugin can be configured to run in the background to surface validation failures in the form | ||
of a CSV report. This report is generated per annotation on which validation is performed | ||
- _**Fail build**_ - Enforce build failure if validation fails | ||
|
||
## Plugin configuration parameters | ||
|
||
| Parameter | Description | | ||
|-----------------------|---------------------------------------| | ||
| _generateReport_ | (Boolean) Generates report per annotation class using format (annotation-plugin-validation-result-{package.annotation-class-name}.csv in the base director path for the module| | ||
| _failBuildOnError_ | (Boolean) Fails build on encountering validation errors if set to true| | ||
| _serviceName_ | (String) Name of the service against which plugin validation is being executed| | ||
| _validationSkip_ | (Boolean) Skips annotation validation in its entirety if set to true| | ||
| _annotations.annotation_| (List) fully qualified class names for annotations| | ||
|
||
## Usage | ||
|
||
Sample configuration to generate validation report for a specific annotation (e.g., `uk.gov.justice.domain.annotation.Event`: | ||
|
||
```xml | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>uk.gov.justice.maven</groupId> | ||
<artifactId>annotation-validator-maven-plugin</artifactId> | ||
<version>LATEST</version> <!-- pick a suitable version --> | ||
<configuration> | ||
<generateReport>true</generateReport> | ||
<failBuildOnError>false</failBuildOnError> | ||
<serviceName>structure</serviceName> | ||
<validationSkip>false</validationSkip> | ||
<annotations> | ||
<annotation>uk.gov.justice.domain.annotation.Event</annotation> | ||
</annotations> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
``` | ||
|
||
## Further work | ||
|
||
* Refector plugin to separate out framework specific validation logic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters