@Mojo(name="verify", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, threadSafe=true) public class VerifySchemaMojo extends AbstractMainSchemaMojo
This goal verifies that the Permazen schema can be successfully auto-generated from user-supplied model classes.
It also checks that the schema will not lead to any
SchemaMismatchExceptions at runtime.
Such exceptions occur when either:
The first case is detected by having an expected schema XML file.
This file should correspond to the project's current schema version, and is
is used to verify that the schema auto-generated from the project's model classes is still
"same version" compatible with this schema version,
ensuring no mismatch error will occur at runtime. In other words, the actual schema generated from the compiled classes
is verified to match what is expected, which is recorded in this file.
The current expected schema XML file location is configured by
The second case it detected by supplying XML files containing any old schema versions that are still active
in the old schema files directory. All files ending in
.xml found anywhere under this
directory are checked for "different version" incompatibilities
with the current schema version. The old schema XML files directory is configured by
If this goal fails due to an incompatibility of the first type:
<actualSchemaFile>) should be copied to the current expected schema XML file;
If this goal fails due to an incompatibility of the second type, you must adjust your model classes to make
them compatible again. For example, manually reassign a conflicting field a different
|Modifier and Type||Field and Description|
classes, packages, project, schemaVersionProperty, storageIdGeneratorClass
|Constructor and Description|
|Modifier and Type||Method and Description|
getLog, getPluginContext, setLog, setPluginContext
Copyright © 2022. All rights reserved.