Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Using classpath changelog with the Maven plugin

$
0
0
Hi,

I'm trying to configure the Maven plugin to use a changelog from the current project classpath, instead of pointing directly to the file, but I can't seem to get it working. My plugin configuration is:
  1.             <plugin>
  2.             <groupId>org.liquibase</groupId>
  3.             <artifactId>liquibase-maven-plugin</artifactId>
  4.             <version>2.0.5</version>
  5.             <configuration>
  6.             <changeLogFile>/com/company/model/db.changelog-master.xml</changeLogFile>
  7.             <driver>org.h2.Driver</driver>
  8.             <url>jdbc:h2:/opt/company/databases/db</url>
  9.             </configuration>
  10.             </plugin>
My changelog file is under src/main/resources/com/company/model/ . When I specify <changeLogFile>src/main/resources/com/company/model/db-changelog-master.xml</changeLogFile> it works fine, but when I try to get to it through the classpath, with just /com/company... or classpath:/com/company it fails with "/com/company/...xml does not exist".

Is there a way to configure the Maven plugin to lookup the changelog file from the classpath ?

I need to do so because I also run liquibase outside Maven (on the same database) using a changelog from the classpath, and if I try to run it later from Maven using /src/main/resources/... then the changelog file paths are not the same, and liquibase tries to recreate the tables from scratch.

Thanks,

Nico

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>