public abstract class AbstractLiquibaseMojo
extends org.apache.maven.plugin.AbstractMojo
Liquibase
functionality.Modifier and Type | Field and Description |
---|---|
protected String |
changeExecListenerClass
Specifies the fully qualified class name of the custom ChangeExecListener
|
protected String |
changeExecListenerPropertiesFile
Specifies the property file for controlling the custom ChangeExecListener
|
protected String |
changelogCatalogName
Specifies the schema Liquibase will use to create your changelog tables.
|
protected String |
changelogSchemaName
Specifies the schema Liquibase will use to create your changelog table.
|
protected boolean |
clearCheckSums
A flag that forces checksums to be cleared from the DATABASECHANGELOG table.
|
protected String |
commandName |
protected String |
databaseChangeLogLockTableName
Specifies the table name to use for the DATABASECHANGELOGLOCK table.
|
protected String |
databaseChangeLogTableName
Specifies the table name to use for the DATABASECHANGELOG table.
|
protected String |
databaseClass
Specifies the database object class.
|
protected String |
defaultCatalogName
Specifies the default catalog name to use for the database connection.
|
protected DefaultChangeExecListener |
defaultChangeExecListener |
protected String |
defaultSchemaName
Specifies the default schema name to use for the database connection.
|
protected String |
driver
Specifies the driver class name to use for the database connection.
|
protected boolean |
emptyPassword
Deprecated.
Use an empty or null value for the password instead.
|
protected boolean |
includeArtifact
Includes a Maven project artifact in the class loader which obtains the liquibase.properties and changelog files.
|
protected boolean |
includeTestOutputDirectory
Includes the Maven test output directory in the class loader which obtains the liquibase.properties and changelog files.
|
protected String |
logging
Deprecated.
Logging managed by maven
|
protected boolean |
outputDefaultCatalog
Specifies whether to ignore the catalog/database name.
|
protected boolean |
outputDefaultSchema
Specifies whether to ignore the schema name.
|
protected String |
outputFileEncoding
A flag which indicates you want to set the character encoding of the output file during the updateSQL phase.
|
protected String |
password
Specifies the database password for database connection.
|
protected Boolean |
preserveSchemaCase
Specifies whether to preserve the case of schemas and catalogs
|
protected org.apache.maven.project.MavenProject |
project
The Maven project that plugin is running under.
|
protected boolean |
promptOnNonLocalDatabase
Deprecated.
No longer prompts
|
protected String |
propertyFile
Specifies the liquibase.properties you want to use to configure Liquibase.
|
protected boolean |
propertyFileWillOverride
A flag which indicates you want the liquibase.properties file to override any settings provided in the Maven plugin configuration.
|
protected String |
propertyProviderClass
Specifies the property provider which must be a java.util.Properties implementation.
|
protected String |
psqlArgs
Specifies additional psql args.
|
protected String |
psqlExecutorName
Specifies psql executor name.
|
protected Boolean |
psqlKeepTemp
Specifies whether to keep generated psql files.
|
protected String |
psqlKeepTempName
Specifies the name of generated psql files.
|
protected String |
psqlKeepTempPath
Specifies where to keep generated psql files.
|
protected String |
psqlLogFile
Specifies where to output psql logs.
|
protected String |
psqlPath
Specifies your psql path.
|
protected Integer |
psqlTimeout
Specifies psql timeout.
|
protected String |
searchPath
Specifies the locations where Liquibase can find your changelog files.
|
protected boolean |
showBanner
Show the liquibase banner in output.
|
protected boolean |
skip
Specifies whether to skip running Liquibase.
|
protected String |
sqlcmdArgs
Specifies additional sqlcmd args.
|
protected String |
sqlcmdCatalogName
Specifies sqlcmd catalog name.
|
protected String |
sqlcmdExecutorName
Specifies sqlcmd executor name.
|
protected Boolean |
sqlcmdKeepTemp
Specifies whether to keep generated sqlcmd files.
|
protected String |
sqlcmdKeepTempName
Specifies the name of generated sqlcmd files.
|
protected Boolean |
sqlcmdKeepTempOverwrite
Specifies whether to overwrite generated sqlcmd files.
|
protected String |
sqlcmdKeepTempPath
Specifies where to keep generated sqlcmd files.
|
protected String |
sqlcmdLogFile
Specifies where to output sqlcmd logs.
|
protected String |
sqlcmdPath
Specifies your sqlcmd path.
|
protected Integer |
sqlcmdTimeout
Specifies sqlcmd timeout.
|
protected String |
sqlPlusArgs
Specifies additional sqlplus args.
|
protected String |
sqlPlusExecutorName
Specifies sqlPlus executor name.
|
protected Boolean |
sqlPlusKeepTemp
Specifies whether to keep generated sqlplus files.
|
protected String |
sqlPlusKeepTempName
Specifies the name of generated sqlplus files.
|
protected Boolean |
sqlPlusKeepTempOverwrite
Specifies whether to overwrite generated sqlplus files.
|
protected String |
sqlPlusKeepTempPath
Specifies where to keep generated sqlplus files.
|
protected String |
sqlPlusLogFile
Specifies where to output sqlplus logs.
|
protected String |
sqlPlusPath
Specifies your sqlplus path.
|
protected Integer |
sqlPlusTimeout
Specifies sqlplus timeout.
|
protected Properties |
systemProperties
Specifies a list of system properties you want to to pass to the database.
|
protected String |
url
Specifies the database URL you want to use to execute Liquibase.
|
protected String |
username
Specifies the database username for database connection.
|
protected boolean |
verbose
Controls the amount of output detail when you call the plugin.
|
protected org.apache.maven.artifact.manager.WagonManager |
wagonManager
The Maven Wagon manager to use when obtaining server authentication details.
|
Constructor and Description |
---|
AbstractLiquibaseMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkRequiredParametersAreSpecified()
Performs some validation after the properties file has been loaded checking that all
properties required have been specified.
|
protected void |
cleanup(Database db) |
protected void |
configureChangeLogProperties() |
void |
configureFieldsAndValues() |
protected Liquibase |
createLiquibase(Database db) |
boolean |
databaseConnectionRequired()
Optionally, an implementation of this mojo can override this to indicate that a connection to the database
is not required.
|
void |
execute() |
protected ClassLoader |
getClassLoaderIncludingProjectClasspath()
Returns an isolated classloader.
|
protected Field |
getField(Class clazz,
String name) |
protected String |
getLicenseKey()
Get the specified license key.
|
protected Liquibase |
getLiquibase() |
protected ClassLoader |
getMavenArtifactClassLoader() |
protected Writer |
getOutputWriter(File outputFile) |
protected ResourceAccessor |
getResourceAccessor(ClassLoader cl) |
protected boolean |
isPromptOnNonLocalDatabase()
Deprecated.
no longer prompts
|
protected void |
parsePropertiesFile(InputStream propertiesInputStream)
Parses a properties file and sets the associated fields in the plugin.
|
protected abstract void |
performLiquibaseTask(Liquibase liquibase) |
protected void |
printSettings(String indent)
Prints the settings that have been set of defaulted for the plugin.
|
protected void |
setupBindInfoPackage() |
@PropertyElement protected Boolean preserveSchemaCase
@PropertyElement protected String driver
@PropertyElement protected String url
protected org.apache.maven.artifact.manager.WagonManager wagonManager
@PropertyElement protected String username
@PropertyElement protected String password
@PropertyElement protected boolean emptyPassword
password
setting.@PropertyElement protected boolean outputDefaultSchema
@PropertyElement protected boolean outputDefaultCatalog
@PropertyElement protected String defaultCatalogName
@PropertyElement protected String defaultSchemaName
@PropertyElement protected String databaseClass
@PropertyElement protected String propertyProviderClass
@PropertyElement protected boolean promptOnNonLocalDatabase
@PropertyElement protected boolean includeArtifact
@PropertyElement protected boolean includeTestOutputDirectory
@PropertyElement protected boolean verbose
@PropertyElement protected String logging
@PropertyElement protected String propertyFile
@PropertyElement protected boolean propertyFileWillOverride
@PropertyElement protected boolean clearCheckSums
@PropertyElement protected Properties systemProperties
protected org.apache.maven.project.MavenProject project
@PropertyElement protected boolean skip
@PropertyElement protected String outputFileEncoding
@PropertyElement protected String changelogCatalogName
@PropertyElement protected String changelogSchemaName
@PropertyElement protected String databaseChangeLogTableName
@PropertyElement protected String databaseChangeLogLockTableName
@PropertyElement protected boolean showBanner
@PropertyElement protected String searchPath
@PropertyElement protected String psqlPath
@PropertyElement protected Boolean psqlKeepTemp
@PropertyElement protected String psqlKeepTempName
@PropertyElement protected String psqlKeepTempPath
@PropertyElement protected String psqlArgs
@PropertyElement protected String psqlExecutorName
@PropertyElement protected Integer psqlTimeout
@PropertyElement protected String psqlLogFile
@PropertyElement protected String sqlPlusPath
@PropertyElement protected Boolean sqlPlusKeepTemp
@PropertyElement protected String sqlPlusKeepTempName
@PropertyElement protected String sqlPlusKeepTempPath
@PropertyElement protected Boolean sqlPlusKeepTempOverwrite
@PropertyElement protected String sqlPlusArgs
@PropertyElement protected String sqlPlusExecutorName
@PropertyElement protected Integer sqlPlusTimeout
@PropertyElement protected String sqlPlusLogFile
@PropertyElement protected String sqlcmdPath
@PropertyElement protected Boolean sqlcmdKeepTemp
@PropertyElement protected String sqlcmdKeepTempName
@PropertyElement protected String sqlcmdKeepTempPath
@PropertyElement protected Boolean sqlcmdKeepTempOverwrite
@PropertyElement protected String sqlcmdArgs
@PropertyElement protected String sqlcmdExecutorName
@PropertyElement protected Integer sqlcmdTimeout
@PropertyElement protected String sqlcmdLogFile
@PropertyElement protected String sqlcmdCatalogName
@PropertyElement protected String changeExecListenerClass
@PropertyElement protected String changeExecListenerPropertiesFile
protected String commandName
protected DefaultChangeExecListener defaultChangeExecListener
protected String getLicenseKey()
protected Writer getOutputWriter(File outputFile) throws IOException
IOException
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected Field getField(Class clazz, String name) throws NoSuchFieldException
NoSuchFieldException
protected Liquibase getLiquibase()
protected void setupBindInfoPackage()
protected abstract void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException
LiquibaseException
protected boolean isPromptOnNonLocalDatabase()
protected Liquibase createLiquibase(Database db) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public void configureFieldsAndValues() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void configureChangeLogProperties() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
protected ClassLoader getMavenArtifactClassLoader() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected ClassLoader getClassLoaderIncludingProjectClasspath() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected ResourceAccessor getResourceAccessor(ClassLoader cl) throws IOException, org.apache.maven.plugin.MojoFailureException
IOException
org.apache.maven.plugin.MojoFailureException
protected void checkRequiredParametersAreSpecified() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
- If any property that is required has not been
specified.public boolean databaseConnectionRequired()
protected void printSettings(String indent)
indent
- The indent string to use when printing the settings.protected void cleanup(Database db)
protected void parsePropertiesFile(InputStream propertiesInputStream) throws org.apache.maven.plugin.MojoExecutionException
propertiesInputStream
- The input stream which is the Liquibase properties that
needs to be parsed.org.apache.maven.plugin.MojoExecutionException
- If there is a problem parsing
the file.Copyright © 2023 Liquibase.org. All rights reserved.