Package org.liquibase.maven.plugins
Class LiquibaseRollbackOneChangeSetSQL
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.liquibase.maven.plugins.AbstractLiquibaseMojo
-
- org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
-
- org.liquibase.maven.plugins.LiquibaseRollbackOneChangeSetSQL
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
public class LiquibaseRollbackOneChangeSetSQL extends AbstractLiquibaseChangeLogMojo
Displays the SQL which will be executed when the corresponding rollbackOneChangeSet command is executed. This command does not perform the actual rollback. A Liquibase Pro license key is required.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
changeSetAuthor
Specifies the author of the changeSet you want to rollback.protected String
changeSetId
The changeset ID to rollbackprotected String
changeSetPath
Specifies the path to the changelog which contains the change-set you want to rollback.protected String
outputFile
Specifies the path to the generated SQL output file.protected String
rollbackScript
Specifies the path to a rollback script-
Fields inherited from class org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
changeLogDirectory, changeLogFile, contexts, duplicateFileMode, labelFilter, labels
-
Fields inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
changeExecListenerClass, changeExecListenerPropertiesFile, changelogCatalogName, changelogSchemaName, clearCheckSums, commandName, databaseChangelogHistoryCaptureExtensions, databaseChangelogHistoryCaptureSql, databaseChangelogHistoryEnabled, databaseChangeLogLockTableName, databaseChangeLogTableName, databaseClass, dbclHistoryCaptureExtensions, dbclHistoryCaptureSql, dbclHistoryEnabled, defaultCatalogName, defaultChangeExecListener, defaultSchemaName, driver, emptyPassword, includeArtifact, includeTestOutputDirectory, logFormat, logging, logLevel, mojoExecution, outputDefaultCatalog, outputDefaultSchema, outputFileEncoding, password, preserveSchemaCase, project, promptOnNonLocalDatabase, propertyFile, propertyFileWillOverride, propertyProviderClass, psqlArgs, psqlKeepTemp, psqlKeepTempName, psqlKeepTempPath, psqlLogFile, psqlPath, psqlTimeout, searchPath, session, showBanner, skip, skipOnFileExists, sqlcmdArgs, sqlcmdCatalogName, sqlcmdKeepTemp, sqlcmdKeepTempName, sqlcmdKeepTempOverwrite, sqlcmdKeepTempPath, sqlcmdLogFile, sqlcmdPath, sqlcmdTimeout, sqlPlusArgs, sqlPlusKeepTemp, sqlPlusKeepTempName, sqlPlusKeepTempOverwrite, sqlPlusKeepTempPath, sqlPlusLogFile, sqlPlusPath, sqlPlusTimeout, systemProperties, url, username, verbose, wagonManager
-
-
Constructor Summary
Constructors Constructor Description LiquibaseRollbackOneChangeSetSQL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
protected void
performLiquibaseTask(Liquibase liquibase)
Performs the actual Liquibase task on the database using the fully configuredLiquibase
.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.AbstractLiquibaseChangeLogMojo
checkRequiredParametersAreSpecified, createLiquibase, getLabelFilter, getResourceAccessor
-
Methods inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
cleanup, configureChangeLogProperties, configureFieldsAndValues, databaseConnectionRequired, getClassLoaderIncludingProjectClasspath, getField, getLicenseKey, getLiquibase, getLog, getMavenArtifactClassLoader, getOutputStream, getOutputWriter, isPromptOnNonLocalDatabase, parsePropertiesFile, setPassword, setupBindInfoPackage, setUrl, setUsername
-
-
-
-
Field Detail
-
changeSetId
@PropertyElement protected String changeSetId
The changeset ID to rollback
-
changeSetAuthor
@PropertyElement protected String changeSetAuthor
Specifies the author of the changeSet you want to rollback.
-
changeSetPath
@PropertyElement protected String changeSetPath
Specifies the path to the changelog which contains the change-set you want to rollback.
-
rollbackScript
@PropertyElement protected String rollbackScript
Specifies the path to a rollback script
-
outputFile
@PropertyElement protected String outputFile
Specifies the path to the generated SQL output file.
-
-
Method Detail
-
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 classAbstractLiquibaseChangeLogMojo
- Parameters:
indent
- The indent string to use when printing the settings.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractLiquibaseMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
performLiquibaseTask
protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException
Description copied from class:AbstractLiquibaseChangeLogMojo
Performs the actual Liquibase task on the database using the fully configuredLiquibase
.- Overrides:
performLiquibaseTask
in classAbstractLiquibaseChangeLogMojo
- Parameters:
liquibase
- TheLiquibase
that has been fully configured to run the desired database task.- Throws:
LiquibaseException
-
-