Configuring Liquibase Hub Attributes in your Maven POM File

Liquibase Hub uses several attributes which are configurable in your Maven pom.xml file. These attributes include:

  • Liquibase Hub API Key
  • Liquibase Hub Connection ID
  • Liquibase Hub Project ID
  • Liquibase Hub Mode

Currently, there are two ways to configure Liquibase Hub properties in your Maven pom.xml file. These include:

  1. Using Long-Format Properties
  2. Using Short-Format Properties

Both global and plug-in configurations perform the same configuration of Maven Liquibase. The decision of which section to use depends on the user's preference for POM configuration. The only required property to connect to Liquibase Hub is the Liquibase Hub API key.

Note: If your changelog is not registered, the liquibase:registerChangeLog goal needs to have both the Liquibase Hub API key as well as the Liquibase Project Id specified in the POM.

Long-Format Properties Method

The first way to configure Liquibase Hub is to specify the long-format property in the global properties section of the pom.xml file. The following is a list of the current long format Liquibase Hub properties:

  • liquibase.hub.apiKey
  • liquibase.hubProjectId
  • liquibase.hubConnectionId
  • liquibase.hub.mode

Note: Maven is case sensitive and all Liquibase Hub properties must be specified with the exact casing given in this document.

Example

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Hub Mode -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<liquibase.hub.apiKey>REQUIRED</liquibase.hub.apiKey>
<liquibase.hubProjectId>REQUIRED FOR registerChangeLog</liquibase.hubProjectId>
<liquibase.hubConnectionId>OPTIONAL</liquibase.hubConnectionId>
<liquibase.hub.mode>OPTIONAL</liquibase.hub.mode>

Short-Format Properties Method

The second way to configure Liquibase Hub is to specify the short-format properties in the Liquibase plug-in configuration section.

  • hubApiKey
  • hubProjectID
  • hubConnectionId
  • hubMode

Note: Maven is case sensitive and all Liquibase Hub properties must be specified with the exact casing given in this document.

Example

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Hub Mode -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<hubApiKey>REQUIRED</hubApiKey>
<hubProjectId>REQUIRED for registerChangeLog</hubProjectId>
<hubConnectionId>OPTIONAL</hubConnectionId>
<hubMode>OPTIONAL</hubMode>

Related Links