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
,LiquibaseSnapshotMojo
,LiquibaseUnexpectedChangeSetsMojo
,LiquibaseValidate
A Liquibase MOJO that requires the user to provide a DatabaseChangeLogFile to be able
to perform any actions on the database.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Specifies the directory where Liquibase can find your changelog file.protected String
Specifies the changelog file for Liquibase to use.protected String
Specifies which contexts Liquibase will execute, which can be separated by a comma if multiple contexts are required.protected String
How to handle multiple files being found in the search path that have duplicate paths.protected String
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.protected String
Deprecated.Fields inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
analyticsEnabled, 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, suppressLiquibaseSql, systemProperties, url, username, vaultAddr, vaultNamespace, vaultToken, verbose, wagonManager
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Performs some validation after the properties file has been loaded checking that all properties required have been specified.protected Liquibase
protected ResourceAccessor
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.AbstractLiquibaseMojo
cleanup, configureChangeLogProperties, configureFieldsAndValues, databaseConnectionRequired, execute, getClassLoaderIncludingProjectClasspath, getField, getLicenseKey, getLiquibase, getLog, getMavenArtifactClassLoader, getOutputStream, getOutputWriter, isPromptOnNonLocalDatabase, parsePropertiesFile, setPassword, setupBindInfoPackage, setUrl, setUsername, setVaultAddr, setVaultNamespace, setVaultToken
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getPluginContext, setLog, setPluginContext
-
Field Details
-
changeLogDirectory
Specifies the directory where Liquibase can find your changelog file. This is an aliases for searchPath -
changeLogFile
Specifies the changelog file for Liquibase to use. -
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
Deprecated.Deprecated version of labelFilter -
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
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)
-
-
Constructor Details
-
AbstractLiquibaseChangeLogMojo
public AbstractLiquibaseChangeLogMojo()
-
-
Method Details
-
checkRequiredParametersAreSpecified
protected void checkRequiredParametersAreSpecified() throws org.apache.maven.plugin.MojoFailureExceptionDescription copied from class:AbstractLiquibaseMojo
Performs some validation after the properties file has been loaded checking that all properties required have been specified.- Overrides:
checkRequiredParametersAreSpecified
in classAbstractLiquibaseMojo
- Throws:
org.apache.maven.plugin.MojoFailureException
- If any property that is required has not been specified.
-
performLiquibaseTask
Performs the actual Liquibase task on the database using the fully configuredLiquibase
.- Specified by:
performLiquibaseTask
in classAbstractLiquibaseMojo
- Parameters:
liquibase
- TheLiquibase
that has been fully configured to run the desired database task.- Throws:
LiquibaseException
-
printSettings
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 classAbstractLiquibaseMojo
- Parameters:
indent
- The indent string to use when printing the settings.
-
getResourceAccessor
protected ResourceAccessor getResourceAccessor(ClassLoader cl) throws IOException, org.apache.maven.plugin.MojoFailureException - Overrides:
getResourceAccessor
in classAbstractLiquibaseMojo
- Throws:
IOException
org.apache.maven.plugin.MojoFailureException
-
createLiquibase
protected Liquibase createLiquibase(Database db) throws org.apache.maven.plugin.MojoExecutionException - Overrides:
createLiquibase
in classAbstractLiquibaseMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getLabelFilter
-