@Mojo(name="avro-validate",
defaultPhase=TEST,
requiresProject=true)
public final class SchemaValidatorMojo
extends SchemaMojoBase
implements ValidatorMojo
Mojo that runs all Schema validators on this project schemas
Built in validators:
By default validation issues will fail the build. This can be disabled at validator level with:
<validatorConfigs>
<[validatorName].failOnIssue></[validatorName].failOnIssue>
</validatorConfigs>
A particular validator can be sckipped at schema level with:
@ignoreValidators(["validatorname"])
Custom validators can be built and used. A custom validator, will need to implement the org.spf4j.maven.plugin.avro.avscp.validation.Validator interface, and will be loaded via the java Service Loader api.
dependenciesDirectory, generatedAvscTarget, generatedJavaTarget, mavenProject, mavenSession, repoSystem, sourceDirectory, target| Constructor and Description |
|---|
SchemaValidatorMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
String[] |
getSchemaFiles() |
Map<String,String> |
getValidatorConfigs() |
void |
handleValidation(Map<String,Validator.Result> vresult,
org.apache.maven.plugin.logging.Log logger,
String detail) |
String |
toString()
will be overwritten as needed, and override will include this result.
|
getGeneratedAvscTarget, getMavenProject, getMavenSession, getRepoSystem, getTargetgetLog, getPluginContext, setLog, setPluginContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetGeneratedAvscTarget, getLog, getMavenProject, getMavenSession, getRepoSystem, getTargetpublic Map<String,String> getValidatorConfigs()
getValidatorConfigs in interface ValidatorMojopublic void execute()
throws org.apache.maven.plugin.MojoExecutionException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionExceptionpublic void handleValidation(Map<String,Validator.Result> vresult, org.apache.maven.plugin.logging.Log logger, String detail) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic String[] getSchemaFiles()
public String toString()
SchemaMojoBasetoString in class SchemaMojoBaseCopyright © 2018 SPF4J. All rights reserved.