org.liquibase.maven.plugins
Class AbstractLiquibaseChangeLogMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.liquibase.maven.plugins.AbstractLiquibaseMojo
          extended by org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractLiquibaseUpdateMojo, LiquibaseChangeLogSyncMojo, LiquibaseChangeLogSyncSQLMojo, LiquibaseDatabaseDiff, LiquibaseDBDocMojo, LiquibaseReportStatusMojo, LiquibaseRollback

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.

Author:
Peter Murray

Field Summary
protected  String changeLogFile
          Specifies the change log file to use for Liquibase.
protected  String contexts
          The Liquibase contexts to execute, which can be "," separated if multiple contexts are required.
 
Fields inherited from class org.liquibase.maven.plugins.AbstractLiquibaseMojo
changelogCatalogName, changelogSchemaName, clearCheckSums, databaseClass, defaultCatalogName, defaultSchemaName, driver, emptyPassword, includeArtifact, includeTestOutputDirectory, logging, outputDefaultCatalog, outputDefaultSchema, outputFileEncoding, password, project, promptOnNonLocalDatabase, propertyFile, propertyFileWillOverride, skip, systemProperties, url, username, verbose, wagonManager
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractLiquibaseChangeLogMojo()
           
 
Method Summary
protected  void checkRequiredParametersAreSpecified()
          Performs some validation after the properties file has been loaded checking that all properties required have been specified.
protected  Liquibase createLiquibase(ResourceAccessor fo, Database db)
           
protected  ResourceAccessor getFileOpener(ClassLoader cl)
           
protected  void performLiquibaseTask(Liquibase liquibase)
          Performs the actual Liquibase task on the database using the fully configured Liquibase.
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, configureFieldsAndValues, execute, getClassLoaderIncludingProjectClasspath, getLiquibase, getMavenArtifactClassLoader, getOutputWriter, isPromptOnNonLocalDatabase, parsePropertiesFile
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeLogFile

protected String changeLogFile
Specifies the change log file to use for Liquibase.


contexts

protected String contexts
The Liquibase contexts to execute, which can be "," separated if multiple contexts are required. If no context is specified then ALL contexts will be executed.

Constructor Detail

AbstractLiquibaseChangeLogMojo

public AbstractLiquibaseChangeLogMojo()
Method Detail

checkRequiredParametersAreSpecified

protected void checkRequiredParametersAreSpecified()
                                            throws org.apache.maven.plugin.MojoFailureException
Description 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 class AbstractLiquibaseMojo
Throws:
org.apache.maven.plugin.MojoFailureException - If any property that is required has not been specified.

performLiquibaseTask

protected void performLiquibaseTask(Liquibase liquibase)
                             throws LiquibaseException
Performs the actual Liquibase task on the database using the fully configured Liquibase.

Specified by:
performLiquibaseTask in class AbstractLiquibaseMojo
Parameters:
liquibase - The Liquibase that has been fully configured to run the desired database task.
Throws:
LiquibaseException

printSettings

protected void printSettings(String indent)
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 class AbstractLiquibaseMojo
Parameters:
indent - The indent string to use when printing the settings.

getFileOpener

protected ResourceAccessor getFileOpener(ClassLoader cl)
Overrides:
getFileOpener in class AbstractLiquibaseMojo

createLiquibase

protected Liquibase createLiquibase(ResourceAccessor fo,
                                    Database db)
                             throws org.apache.maven.plugin.MojoExecutionException
Overrides:
createLiquibase in class AbstractLiquibaseMojo
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2014 Liquibase.org. All Rights Reserved.