public abstract class AbstractLiquibaseMojo
extends org.apache.maven.plugin.AbstractMojo
Liquibase
functionality.Modifier and Type | Field and Description |
---|---|
protected String |
changelogCatalogName
Schema against which Liquibase changelog tables will be created.
|
protected String |
changelogSchemaName
Schema against which Liquibase changelog tables will be created.
|
protected boolean |
clearCheckSums
Flag for forcing the checksums to be cleared from teh DatabaseChangeLog table.
|
protected String |
databaseChangeLogLockTableName
Table name to use for the databasechangelog.
|
protected String |
databaseChangeLogTableName
Table name to use for the databasechangelog.
|
protected String |
databaseClass
The class to use as the database object.
|
protected String |
defaultCatalogName
The default catalog name to use the for database connection.
|
protected String |
defaultSchemaName
The default schema name to use the for database connection.
|
protected String |
driver
The fully qualified name of the driver class to use to connect to the database.
|
protected boolean |
emptyPassword
Deprecated.
Use an empty or null value for the password instead.
|
protected boolean |
includeArtifact
Allows for the maven project artifact to be included in the class loader for
obtaining the Liquibase property and DatabaseChangeLog files.
|
protected boolean |
includeTestOutputDirectory
Allows for the maven test output directory to be included in the class loader for
obtaining the Liquibase property and DatabaseChangeLog files.
|
protected String |
logging
Controls the level of logging from Liquibase when executing.
|
protected boolean |
outputDefaultCatalog
Whether to ignore the catalog/database name.
|
protected boolean |
outputDefaultSchema
Whether to ignore the schema name.
|
protected String |
outputFileEncoding
Flag to set the character encoding of the output file produced by Liquibase during the updateSQL phase.
|
protected String |
password
The database password to use to connect to the specified database.
|
protected org.apache.maven.project.MavenProject |
project
The Maven project that plugin is running under.
|
protected boolean |
promptOnNonLocalDatabase
Controls the prompting of users as to whether or not they really want to run the
changes on a database that is not local to the machine that the user is current
executing the plugin on.
|
protected String |
propertyFile
The Liquibase properties file used to configure the Liquibase
Liquibase . |
protected boolean |
propertyFileWillOverride
Flag allowing for the Liquibase properties file to override any settings provided in
the Maven plugin configuration.
|
protected String |
propertyProviderClass
The class to use as the property provider (must be a java.util.Properties implementation).
|
protected boolean |
skip
Set this to 'false' to skip running liquibase.
|
protected Properties |
systemProperties
List of system properties to pass to the database.
|
protected String |
url
The Database URL to connect to for executing Liquibase.
|
protected String |
username
The database username to use to connect to the specified database.
|
protected boolean |
verbose
Controls the verbosity of the output from invoking 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) |
void |
configureFieldsAndValues(ResourceAccessor fo) |
protected Liquibase |
createLiquibase(ResourceAccessor fo,
Database db) |
void |
execute() |
protected ClassLoader |
getClassLoaderIncludingProjectClasspath()
Returns an isolated classloader.
|
protected ResourceAccessor |
getFileOpener(ClassLoader cl) |
protected Liquibase |
getLiquibase() |
protected ClassLoader |
getMavenArtifactClassLoader() |
protected Writer |
getOutputWriter(File outputFile) |
protected boolean |
isPromptOnNonLocalDatabase() |
protected void |
parsePropertiesFile(InputStream propertiesInputStream)
Parses a properties file and sets the assocaited 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 String driver
protected String url
protected org.apache.maven.artifact.manager.WagonManager wagonManager
protected String username
protected String password
protected boolean emptyPassword
password
setting.protected boolean outputDefaultSchema
protected boolean outputDefaultCatalog
protected String defaultCatalogName
protected String defaultSchemaName
protected String databaseClass
protected String propertyProviderClass
protected boolean promptOnNonLocalDatabase
protected boolean includeArtifact
protected boolean includeTestOutputDirectory
protected boolean verbose
protected String logging
protected String propertyFile
Liquibase
.protected boolean propertyFileWillOverride
protected boolean clearCheckSums
protected Properties systemProperties
protected org.apache.maven.project.MavenProject project
protected boolean skip
protected String outputFileEncoding
protected String changelogCatalogName
protected String changelogSchemaName
protected String databaseChangeLogTableName
protected String databaseChangeLogLockTableName
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 Liquibase getLiquibase()
protected abstract void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException
LiquibaseException
protected boolean isPromptOnNonLocalDatabase()
protected Liquibase createLiquibase(ResourceAccessor fo, Database db) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public void configureFieldsAndValues(ResourceAccessor fo) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
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 getFileOpener(ClassLoader cl)
protected void checkRequiredParametersAreSpecified() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
- If any property that is required has not been
specified.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 © 2016 Liquibase.org. All rights reserved.