Class LiquibaseGenerateChangeLogMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.liquibase.maven.plugins.AbstractLiquibaseMojo
org.liquibase.maven.plugins.LiquibaseGenerateChangeLogMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class LiquibaseGenerateChangeLogMojo extends AbstractLiquibaseMojo

Generates a changelog based on the current database schema. Typically used when beginning to use Liquibase on an existing project and database schema.

Since:
2.0.6
  • Field Details

    • diffTypes

      @PropertyElement protected String diffTypes
      List of diff types to include in Change Log expressed as a comma separated list from: tables, views, columns, indexes, foreignkeys, primarykeys, uniqueconstraints, data. If this is null then the default types will be: tables, views, columns, indexes, foreignkeys, primarykeys, uniqueconstraints
    • dataDir

      @PropertyElement protected String dataDir
      Directory where insert statement csv files will be kept.
    • changeSetAuthor

      @PropertyElement protected String changeSetAuthor
      The author to be specified for Changesets in the generated Change Log.
    • contexts

      @PropertyElement protected String contexts
      are required. If no context is specified then ALL contexts will be executed.
    • changeSetContext

      @PropertyElement protected String changeSetContext
      The execution context to be used for Changesets in the generated Change Log, which can be "," separated if multiple contexts.
    • outputChangeLogFile

      @PropertyElement protected String outputChangeLogFile
      The target change log file to output to. If this is null then the output will be to the screen.
    • diffExcludeObjects

      @PropertyElement protected String diffExcludeObjects
      Objects to be excluded from the changelog. Example filters: "table_name", "table:main_.*", "column:*._lock, table:primary.*".
    • diffIncludeObjects

      @PropertyElement protected String diffIncludeObjects
      Objects to be included in the changelog. Example filters: "table_name", "table:main_.*", "column:*._lock, table:primary.*".
    • schemas

      @PropertyElement protected String schemas
      Specifies the a list of schemas to indicate liquibase where to apply change objects or where to read current state from
    • includeSchema

      @PropertyElement protected Boolean includeSchema
      Flag to Indicate liquibase whether or not to include schema name on changelog
    • overwriteOutputFile

      @PropertyElement protected boolean overwriteOutputFile
      Flag to allow overwriting of output changelog file
    • runOnChangeTypes

      @PropertyElement protected String runOnChangeTypes
      Sets runOnChange="true" for changesets containing solely changes of these types (e.g. createView, createProcedure, ...).
    • replaceIfExistsTypes

      @PropertyElement protected String replaceIfExistsTypes
      Sets replaceIfExists="true" for changes of the supported types, at the moment they are createView and createProcedure.
    • useOrReplaceOption

      @PropertyElement protected boolean useOrReplaceOption
      Flag to allow adding 'OR REPLACE' option to the create view change object when generating changelog in SQL format
  • Constructor Details

    • LiquibaseGenerateChangeLogMojo

      public LiquibaseGenerateChangeLogMojo()
  • Method Details

    • performLiquibaseTask

      protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException
      Specified by:
      performLiquibaseTask in class AbstractLiquibaseMojo
      Throws:
      LiquibaseException
    • checkRequiredParametersAreSpecified

      protected void checkRequiredParametersAreSpecified() throws org.apache.maven.plugin.MojoFailureException
      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.
    • 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.