com.googlecode.flyway.maven
Class ValidateMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.googlecode.flyway.maven.ValidateMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ValidateMojo
extends org.apache.maven.plugin.AbstractMojo

Maven goal to validate the applied migrations in the database against the available classpath migrations in order to detect accidental migration changes.

Since:
0.9

Field Summary
protected  com.googlecode.flyway.core.util.logging.Log log
           
protected  org.apache.maven.project.MavenProject mavenProject
          Reference to the current project that includes the Flyway Maven plugin.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ValidateMojo()
           
 
Method Summary
protected  void doExecute(Flyway flyway)
          Executes this mojo.
protected  void doExecuteWithMigrationConfig(Flyway flyway)
          Executes Flyway fully configured for loading migrations.
 void execute()
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected com.googlecode.flyway.core.util.logging.Log log

mavenProject

protected org.apache.maven.project.MavenProject mavenProject
Reference to the current project that includes the Flyway Maven plugin.

Constructor Detail

ValidateMojo

public ValidateMojo()
Method Detail

doExecuteWithMigrationConfig

protected void doExecuteWithMigrationConfig(Flyway flyway)
                                     throws Exception
Executes Flyway fully configured for loading migrations.

Parameters:
flyway - The instance of Flyway to launch.
Throws:
Exception - when the execution failed.

doExecute

protected final void doExecute(Flyway flyway)
                        throws Exception
Executes this mojo.

Parameters:
flyway - The flyway instance to operate on.
Throws:
Exception - any exception

execute

public final void execute()
                   throws org.apache.maven.plugin.MojoExecutionException,
                          org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException


Copyright © 2012. All Rights Reserved.