Class 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.

    • Field Detail

      • diffTypes

        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
      • changeSetAuthor

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

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

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

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

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

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

        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

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

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

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

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

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

      • LiquibaseGenerateChangeLogMojo

        public LiquibaseGenerateChangeLogMojo()
    • Method Detail

      • 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.
        checkRequiredParametersAreSpecified in class AbstractLiquibaseMojo
        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.
        printSettings in class AbstractLiquibaseMojo
        indent - The indent string to use when printing the settings.