Managing liquibase dependencies

We’re using liquibase plugin 4.8.0 and I’ve declared this as follows, However, when I run the
mvn liquibase:update, the build process downloads all the dependencies of the project rather than just the liquibase plugins dependencies(+transitive dependencies). Since that dependency list is quite large, it slows down this process.

Has anyone found a solution to limiting the list of dependencies to only the required set?

FYI, I also tried moving the plugin to a separate profile, but that also didn’t work.

<build>
      <plugins>
        <plugin>
          <groupId>org.liquibase</groupId>
          <artifactId>liquibase-maven-plugin</artifactId>
          <version>${liquibase.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.postgresql</groupId>
              <artifactId>postgresql</artifactId>
              <version>42.3.1</version>
            </dependency>
            <dependency>
              <groupId>org.liquibase</groupId>
              <artifactId>liquibase-core</artifactId>
              <version>${liquibase.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      <plugins>
       ...
  </build>

I basically created a standalone pom that just has the liquibase plugin. That worked.

1 Like

Hi @dharminder,

Glad you found a solution. Also, you technically don’t need to include the liquibase-core dependency, because it’s already included in the liquibase-maven-plugin dependency. So you could save yourself five lines if you want to remove it!

-PJ