Skip to content

Liquibase use a changelog outside of my jar file

I developed an app that uses Liquibase and built a jar file.

I was wondering if it is possible to use a changelog file that is outside of the jar file , like for example:

--jar file

I know that Liquibase removed the option to use an absolute path , so is there any other way to achieve this?



Found an answer. If you are using the Java liquibase Api just use a ResourceAccessor

ResourceAccessor accessor= new FileSystemResourceAccessor("C:\Users\demo\Documents\Migrations");
return new Liquibase(changelog, accessor, connection);