org.liquibase.maven.plugins
Class LiquibaseRollbackSQL

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.liquibase.maven.plugins.AbstractLiquibaseMojo
          extended by org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
              extended by org.liquibase.maven.plugins.LiquibaseRollback
                  extended by org.liquibase.maven.plugins.LiquibaseRollbackSQL
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class LiquibaseRollbackSQL
extends LiquibaseRollback

Generates the SQL that is required to rollback the database to the specified pointing attributes 'rollbackCount', 'rollbackTag'

Author:
Oleg Taranenko

Nested Class Summary
 
Nested classes/interfaces inherited from class org.liquibase.maven.plugins.LiquibaseRollback
LiquibaseRollback.RollbackType
 
Field Summary
protected  File migrationSqlOutputFile
          The file to output the Rollback SQL script to, if it exists it will be overwritten.
 
Fields inherited from class org.liquibase.maven.plugins.LiquibaseRollback
rollbackCount, rollbackDate, rollbackScript, rollbackTag, type
 
Fields inherited from class org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
changeLogFile, contexts, labels
 
Fields inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
changelogCatalogName, changelogSchemaName, clearCheckSums, databaseChangeLogLockTableName, databaseChangeLogTableName, databaseClass, defaultCatalogName, defaultSchemaName, driver, emptyPassword, includeArtifact, includeTestOutputDirectory, liquibaseShouldRun, logging, outputDefaultCatalog, outputDefaultSchema, outputFileEncoding, password, project, promptOnNonLocalDatabase, propertyFile, propertyFileWillOverride, propertyProviderClass, systemProperties, url, username, verbose, wagonManager
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
LiquibaseRollbackSQL()
           
 
Method Summary
protected  void cleanup(Database db)
           
protected  Liquibase createLiquibase(ResourceAccessor fo, Database db)
           
protected  boolean isPromptOnNonLocalDatabase()
           
protected  void performLiquibaseTask(Liquibase liquibase)
          Performs the actual Liquibase task on the database using the fully configured Liquibase.
protected  void printSettings(String indent)
          Prints the settings that have been set of defaulted for the plugin.
 
Methods inherited from class org.liquibase.maven.plugins.LiquibaseRollback
checkRequiredParametersAreSpecified, checkRequiredRollbackParameters
 
Methods inherited from class org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
getFileOpener
 
Methods inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
configureFieldsAndValues, execute, getClassLoaderIncludingProjectClasspath, getLiquibase, getMavenArtifactClassLoader, getOutputWriter, parsePropertiesFile
 
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

migrationSqlOutputFile

protected File migrationSqlOutputFile
The file to output the Rollback SQL script to, if it exists it will be overwritten.

Constructor Detail

LiquibaseRollbackSQL

public LiquibaseRollbackSQL()
Method Detail

isPromptOnNonLocalDatabase

protected boolean isPromptOnNonLocalDatabase()
Overrides:
isPromptOnNonLocalDatabase in class AbstractLiquibaseMojo

createLiquibase

protected Liquibase createLiquibase(ResourceAccessor fo,
                                    Database db)
                             throws org.apache.maven.plugin.MojoExecutionException
Overrides:
createLiquibase in class AbstractLiquibaseChangeLogMojo
Throws:
org.apache.maven.plugin.MojoExecutionException

printSettings

protected void printSettings(String indent)
Description copied from class: AbstractLiquibaseMojo
Prints the settings that have been set of defaulted for the plugin. These will only be shown in verbose mode.

Overrides:
printSettings in class LiquibaseRollback
Parameters:
indent - The indent string to use when printing the settings.

cleanup

protected void cleanup(Database db)
Overrides:
cleanup in class AbstractLiquibaseMojo

performLiquibaseTask

protected void performLiquibaseTask(Liquibase liquibase)
                             throws LiquibaseException
Description copied from class: AbstractLiquibaseChangeLogMojo
Performs the actual Liquibase task on the database using the fully configured Liquibase.

Overrides:
performLiquibaseTask in class LiquibaseRollback
Parameters:
liquibase - The Liquibase that has been fully configured to run the desired database task.
Throws:
LiquibaseException


Copyright © 2015 Liquibase.org. All rights reserved.