Class AbstractLiquibaseUpdateMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
LiquibaseUpdate, LiquibaseUpdateSQL, LiquibaseUpdateTestingRollback

public abstract class AbstractLiquibaseUpdateMojo extends AbstractLiquibaseChangeLogMojo
Liquibase Update Maven plugin. This plugin allows for DatabaseChangeLogs to be applied to a database as part of a Maven build process.
  • Field Details

    • changesToApply

      @PropertyElement protected int changesToApply
      The number of changes to apply to the database. By default this value is 0, which will result in all changes (not already applied to the database) being applied.
    • toTag

      protected String toTag
      Update to the changeSet with the given tag command.
    • rollbackOnError

      @PropertyElement protected boolean rollbackOnError
      If set to true and any changeset in a deployment fails, then the update operation stops, and liquibase attempts to rollback all changesets just deployed. A changeset marked "failOnError=false" does not trigger as an error, therefore rollback-on-error will not occur. Additionally, if a changeset is not auto-rollback compliant or does not have a rollback script, then no rollback-on-error will occur for any changeset.
    • showSummary

      @PropertyElement protected liquibase.UpdateSummaryEnum showSummary
      Whether or not to print a summary of the update operation. Allowed values: 'OFF', 'SUMMARY' (default), 'VERBOSE'
    • showSummaryOutput

      @PropertyElement protected liquibase.UpdateSummaryOutputEnum showSummaryOutput
      Flag to control where we show the summary. Allowed values: 'LOG', 'CONSOLE', OR 'ALL' (default)
  • Constructor Details

    • AbstractLiquibaseUpdateMojo

      public AbstractLiquibaseUpdateMojo()
  • Method Details

    • performLiquibaseTask

      protected void performLiquibaseTask(liquibase.Liquibase liquibase) throws liquibase.exception.LiquibaseException
      Description copied from class: AbstractLiquibaseChangeLogMojo
      Performs the actual Liquibase task on the database using the fully configured Liquibase.
      Overrides:
      performLiquibaseTask in class AbstractLiquibaseChangeLogMojo
      Parameters:
      liquibase - The Liquibase that has been fully configured to run the desired database task.
      Throws:
      liquibase.exception.LiquibaseException
    • doUpdate

      protected abstract void doUpdate(liquibase.Liquibase liquibase) throws liquibase.exception.LiquibaseException
      Performs the actual "update" work on the database.
      Parameters:
      liquibase - The Liquibase object to use to perform the "update".
      Throws:
      liquibase.exception.LiquibaseException
    • createLiquibase

      protected liquibase.Liquibase createLiquibase(liquibase.database.Database db) throws org.apache.maven.plugin.MojoExecutionException
      Overrides:
      createLiquibase in class AbstractLiquibaseChangeLogMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • 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 AbstractLiquibaseChangeLogMojo
      Parameters:
      indent - The indent string to use when printing the settings.
    • handleUpdateException

      protected void handleUpdateException(liquibase.exception.LiquibaseException exception) throws liquibase.exception.LiquibaseException
      Throws:
      liquibase.exception.LiquibaseException