Package org.liquibase.maven.plugins
Class AbstractLiquibaseChangeLogMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.liquibase.maven.plugins.AbstractLiquibaseMojo
-
- org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractLiquibaseUpdateMojo,LiquibaseChangeLogSyncMojo,LiquibaseChangeLogSyncSQLMojo,LiquibaseChangeLogSyncToTagMojo,LiquibaseChangeLogSyncToTagSQLMojo,LiquibaseDatabaseDiff,LiquibaseDBDocMojo,LiquibaseReportStatusMojo,LiquibaseRollback,LiquibaseRollbackOneChangeSetMojo,LiquibaseRollbackOneChangeSetSQL,LiquibaseRollbackOneUpdateMojo,LiquibaseRollbackOneUpdateSQL,LiquibaseUnexpectedChangeSetsMojo,LiquibaseValidate
public abstract class AbstractLiquibaseChangeLogMojo extends AbstractLiquibaseMojo
A Liquibase MOJO that requires the user to provide a DatabaseChangeLogFile to be able to perform any actions on the database.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringchangeLogDirectorySpecifies the directory where Liquibase can find your changelog file.protected StringchangeLogFileSpecifies the changelog file for Liquibase to use.protected StringcontextsSpecifies which contexts Liquibase will execute, which can be separated by a comma if multiple contexts are required.protected StringduplicateFileModeHow to handle multiple files being found in the search path that have duplicate paths.protected StringlabelFilterSpecifies which Liquibase labels Liquibase will execute, which can be separated by a comma if multiple labels are required or you need to designate a more complex expression.protected StringlabelsDeprecated.-
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 AbstractLiquibaseChangeLogMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckRequiredParametersAreSpecified()Performs some validation after the properties file has been loaded checking that all properties required have been specified.protected liquibase.LiquibasecreateLiquibase(liquibase.database.Database db)StringgetLabelFilter()protected liquibase.resource.ResourceAccessorgetResourceAccessor(ClassLoader cl)protected voidperformLiquibaseTask(liquibase.Liquibase liquibase)Performs the actual Liquibase task on the database using the fully configuredLiquibase.protected voidprintSettings(String indent)Prints the settings that have been set of defaulted for the plugin.-
Methods inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
cleanup, configureChangeLogProperties, configureFieldsAndValues, databaseConnectionRequired, execute, getClassLoaderIncludingProjectClasspath, getField, getLicenseKey, getLiquibase, getLog, getMavenArtifactClassLoader, getOutputStream, getOutputWriter, isPromptOnNonLocalDatabase, parsePropertiesFile, setPassword, setupBindInfoPackage, setUrl, setUsername
-
-
-
-
Field Detail
-
changeLogDirectory
@PropertyElement protected String changeLogDirectory
Specifies the directory where Liquibase can find your changelog file. This is an aliases for searchPath
-
changeLogFile
@PropertyElement protected String changeLogFile
Specifies the changelog file for Liquibase to use.
-
contexts
@PropertyElement protected String contexts
Specifies which contexts Liquibase will execute, which can be separated by a comma if multiple contexts are required. If a context is not specified, then ALL contexts will be executed.
-
labels
@PropertyElement protected String labels
Deprecated.Deprecated version of labelFilter
-
labelFilter
@PropertyElement protected String labelFilter
Specifies which Liquibase labels Liquibase will execute, which can be separated by a comma if multiple labels are required or you need to designate a more complex expression. If a label is not specified, then ALL labels will be executed.
-
duplicateFileMode
@PropertyElement protected String duplicateFileMode
How to handle multiple files being found in the search path that have duplicate paths. Options are WARN (log warning and choose one at random) or ERROR (fail current operation)
-
-
Method Detail
-
checkRequiredParametersAreSpecified
protected void checkRequiredParametersAreSpecified() throws org.apache.maven.plugin.MojoFailureExceptionDescription copied from class:AbstractLiquibaseMojoPerforms some validation after the properties file has been loaded checking that all properties required have been specified.- Overrides:
checkRequiredParametersAreSpecifiedin classAbstractLiquibaseMojo- Throws:
org.apache.maven.plugin.MojoFailureException- If any property that is required has not been specified.
-
performLiquibaseTask
protected void performLiquibaseTask(liquibase.Liquibase liquibase) throws liquibase.exception.LiquibaseExceptionPerforms the actual Liquibase task on the database using the fully configuredLiquibase.- Specified by:
performLiquibaseTaskin classAbstractLiquibaseMojo- Parameters:
liquibase- TheLiquibasethat has been fully configured to run the desired database task.- Throws:
liquibase.exception.LiquibaseException
-
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 classAbstractLiquibaseMojo- Parameters:
indent- The indent string to use when printing the settings.
-
getResourceAccessor
protected liquibase.resource.ResourceAccessor getResourceAccessor(ClassLoader cl) throws IOException, org.apache.maven.plugin.MojoFailureException
- Overrides:
getResourceAccessorin classAbstractLiquibaseMojo- Throws:
IOExceptionorg.apache.maven.plugin.MojoFailureException
-
createLiquibase
protected liquibase.Liquibase createLiquibase(liquibase.database.Database db) throws org.apache.maven.plugin.MojoExecutionException- Overrides:
createLiquibasein classAbstractLiquibaseMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getLabelFilter
public String getLabelFilter()
-
-