Maven Properties

You can set Liquibase Maven properties to change the behavior of your commands. You can pass arguments like <changeLogFile> in Maven the following ways:

Tags like expressionVariables, expressionVars, and systemProperties can only be set in your POM.

For a list of properties you can set, see the property tables on pages for individual Maven Goals.

Note: You can also run the Maven help goal: mvn liquibase:help -Ddetail=true.


Directly in your POM

The <configuration> section of the POM, within the <plugin> section for Liquibase, allows you to specify settings that Liquibase will use when it runs. The settings control Liquibase's behavior by specifying the attributes Liquibase uses during execution. For example:


Referencing the file

Note: If you use or a custom Liquibase properties file, it must be located in the src/main/resources directory or another place in the search path.


Then, in your file, specify the properties as follows:


For more information, see Create and Configure a File.

Full pom.xml example

Depending on your project and Maven goals you want to run, you might need a specific pom.xml configuration. The following is a basic example of how you can implement it and where the <plugin> tag can typically appear inside the overall structure.

Note: You can add another sections, modify the existing ones, and configure it in your own way. For more information, see Using Liquibase and your Maven POM File.

<!-- Typical Maven header information -->
<project  xmlns=""  
  <!-- Typical Maven information for your project -->

  <!-- Maven hierarchy of elements for your project -->
          <!-- Basic information to get Liquibase plugin:
          include <groupId>, <artifactID>, and <version> elements -->
            <!-- Set values for Liquibase properties and settings
            for example, the location of a properties file to use -->
            <!-- Set up any dependencies for Liquibase to function in your environment for example, a database-specific plugin -->

Related links