includeAll with V4.0.0

We are using Quarkus and the Liquibase integration of it.
With the Quarkus version 1.7.1 which uses Liquibase 3.9.x everything works fine.

But Quarkus 1.8.x upgrades to Liquibase 4.0.0 and this causes issues with change sets using the includeAll tag.

Our changeLog.xml contains following:
<includeAll path="db/1.0.0/" errorIfMissingOrEmpty="true"/>

When we start the application in the Quarkus dev mode (mvn quarkus:dev) everything works fine; the changeLog is read and every file under the given path (db/1.0.0/) is executed/checked from Liquibase.

But if we run the application directly (with java -jar) we are getting following error:

Caused by: liquibase.exception.SetupException: Could not find directory or directory was empty for includeAll 'db/1.0.0/'
	at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:528)

The resources under this given folder are just not found.

If I define the includes per file, it´s working fine:

How can we define the includeAll tags with the new Liquibase 4.0.0 version?

Thanks
Joachim

I did some further debugging.

When starting the application with quarkus:dev, the includeAll resources defined in the changeLog.xml are read from the target/classes folder directly from the file system.
But when we start the application from the JAR, Liquibase tries to load the includeAll resources from inside the JAR file.

This is exactly the same behavior as for the older Quarkus 1.7.x / Liquibase 3.9.x version.
But in Liquibase 4.0.0 the way how the includeAll resources are looked-up has completely changed and seems to cause issues if they are in a JAR file.
The ClassLoaderResourceAccessor#listFromClassLoader method uses url.openStream() to find all the files under the given resource. But this does not work if the resources are located in a JAR.

(The 3.x.x version of the ClassLoaderResourceAccessor had some logic in it when the URL started with java:file)

Is there any plan to solve this in a short time?

Hi @Joachim, are you still having this issue? I was a little confused by the last post. Are you withdrawing the question?

Yes, I still have the issues.
The withdrawn post contained an invalid link to a ticket I created for the issue.

Here is now the correct link to the created Liquibase issue on Github:

1 Like

I see the team is tracking it on your issue @Joachim, thanks so much for logging it, we can track the work there.