Package org.flywaydb.maven
Class ValidateMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.flywaydb.maven.ValidateMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="validate", requiresDependencyResolution=TEST, defaultPhase=PRE_INTEGRATION_TEST, threadSafe=true) public class ValidateMojo extends org.apache.maven.plugin.AbstractMojoValidate applied migrations against resolved ones (on the filesystem or classpath) to detect accidental changes that may prevent the schema(s) from being recreated exactly.
Validation fails if
- differences in migration names, types or checksums are found
- versions have been applied that aren't resolved locally anymore
- versions have been resolved that haven't been applied yet

-
-
Constructor Summary
Constructors Constructor Description ValidateMojo()
-
Method Summary
Modifier and Type Method Description protected voiddoExecute(org.flywaydb.core.Flyway flyway)Executes this mojo.voidexecute()protected java.lang.StringgetProperty(java.lang.String name)Retrieves this property from either the system or the maven properties.
-
-
-
Method Detail
-
doExecute
protected void doExecute(org.flywaydb.core.Flyway flyway) throws java.lang.ExceptionExecutes this mojo.- Parameters:
flyway- The flyway instance to operate on.- Throws:
java.lang.Exception- any exception
-
execute
public final void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getProperty
protected java.lang.String getProperty(java.lang.String name)
Retrieves this property from either the system or the maven properties.- Parameters:
name- The name of the property to retrieve.- Returns:
- The property value.
nullif not found.
-
-