Package org.liquibase.maven.plugins
Class LiquibaseUpdateSQL
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.liquibase.maven.plugins.AbstractLiquibaseMojo
-
- org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
-
- org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo
-
- org.liquibase.maven.plugins.LiquibaseUpdateSQL
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
public class LiquibaseUpdateSQL extends AbstractLiquibaseUpdateMojo
Generates the SQL that is required to update the database to the current version as specified in the DatabaseChangeLogs.
-
-
Field Summary
Fields Modifier and Type Field Description protected FilemigrationSqlOutputFileThe file to output the Migration SQL script to, if it exists it will be overwritten.-
Fields inherited from class org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo
changesToApply, rollbackOnError, toTag
-
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, databaseChangeLogLockTableName, databaseChangeLogTableName, databaseClass, defaultCatalogName, defaultChangeExecListener, defaultSchemaName, driver, emptyPassword, includeArtifact, includeTestOutputDirectory, logFormat, logging, logLevel, outputDefaultCatalog, outputDefaultSchema, outputFileEncoding, password, preserveSchemaCase, project, promptOnNonLocalDatabase, propertyFile, propertyFileWillOverride, propertyProviderClass, psqlArgs, psqlKeepTemp, psqlKeepTempName, psqlKeepTempPath, psqlLogFile, psqlPath, psqlTimeout, searchPath, 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 LiquibaseUpdateSQL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanup(Database db)protected LiquibasecreateLiquibase(Database db)protected voiddoUpdate(Liquibase liquibase)Performs the actual "update" work on the database.protected voidprintSettings(String indent)Prints the settings that have been set of defaulted for the plugin.-
Methods inherited from class org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo
handleUpdateException, performLiquibaseTask
-
Methods inherited from class org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
checkRequiredParametersAreSpecified, getLabelFilter, getResourceAccessor
-
Methods inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
configureChangeLogProperties, configureFieldsAndValues, databaseConnectionRequired, execute, getClassLoaderIncludingProjectClasspath, getField, getLicenseKey, getLiquibase, getLog, getMavenArtifactClassLoader, getOutputStream, getOutputWriter, isPromptOnNonLocalDatabase, parsePropertiesFile, setupBindInfoPackage
-
-
-
-
Field Detail
-
migrationSqlOutputFile
@PropertyElement protected File migrationSqlOutputFile
The file to output the Migration SQL script to, if it exists it will be overwritten.
-
-
Method Detail
-
doUpdate
protected void doUpdate(Liquibase liquibase) throws LiquibaseException
Description copied from class:AbstractLiquibaseUpdateMojoPerforms the actual "update" work on the database.- Specified by:
doUpdatein classAbstractLiquibaseUpdateMojo- Parameters:
liquibase- The Liquibase object to use to perform the "update".- Throws:
LiquibaseException
-
createLiquibase
protected Liquibase createLiquibase(Database db) throws org.apache.maven.plugin.MojoExecutionException
- Overrides:
createLiquibasein classAbstractLiquibaseChangeLogMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
printSettings
protected void printSettings(String indent)
Description copied from class:AbstractLiquibaseMojoPrints the settings that have been set of defaulted for the plugin. These will only be shown in verbose mode.- Overrides:
printSettingsin classAbstractLiquibaseUpdateMojo- Parameters:
indent- The indent string to use when printing the settings.
-
cleanup
protected void cleanup(Database db)
- Overrides:
cleanupin classAbstractLiquibaseMojo
-
-