1

I have a maven spring project using liquibase. At the moment we have multiple instances deploying but sometimes the deployment will fail because the lock will last more than five minutes, due to the size of the changes.

How can I change the changlog wait lock time? I'm using the liquibase maven plugin, for which I didn't find obvious ways to configure this parameter, but I know that a command parameter exists: https://docs.liquibase.com/parameters/command-parameters.html

Heschoon
  • 2,915
  • 9
  • 26
  • 55

1 Answers1

1

The documentation for changelog-lock-wait-time-in-minutes says that you can also set this parameter via liquibase.properties file:

liquibase.changelogLockWaitTimeInMinutes: <int>

Or via Java system property:

Mac/Linux syntax:
JAVA_OPTS=-Dliquibase.changelogLockWaitTimeInMinutes=<int>

Windows syntax:
set JAVA_OPTS=-Dliquibase.changelogLockWaitTimeInMinutes=<int>

For liquibase.properties configuration example with liquibase-maven-plugin check out this Baeldung article

<dependency>
    <groupId>org.liquibase</groupId>
    <artifactId>liquibase-maven-plugin</artifactId>
    <version>3.4.1</version>
</dependency> 
...
<plugins>
    <plugin>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-maven-plugin</artifactId>
        <version>3.4.1</version>
        <configuration>                  
            <propertyFile>src/main/resources/liquibase.properties</propertyFile>
        </configuration>                
    </plugin> 
</plugins>
htshame
  • 6,599
  • 5
  • 36
  • 56
  • Where should I put this liquibase.properties file htshame? In the resources/ folder of my spring application? Will it be automatically detected? – Heschoon Jun 13 '22 at 07:58
  • I've updated my answer with `liquibase.properties` configuration example – htshame Jun 13 '22 at 14:35