includeAll in embedded jar files

Hello, I’m facing the following problem. I have a project on Java 17, Spring Boot 3.2.0. I tried different versions of Liquibase 4.29.2/5.0.1. The project consists of three modules, two are independent of each other, and the third is a core module, which is used as a dependency in the two independent modules, made as a starter.

Each project has its own changeLog, which contains an includeAll that looks at the directory with scripts for itself and an include file with a path to the changeLog file of the third module (the core, which is also a dependency).

In the changeLog file, there is an includeAll with a path to the directory with scripts that are common for the other two modules.
<includeAll path="changelog" errorIfMissingOrEmpty="true" relativeToChangelogFile="true"/>

I run the migration via CLI with this command:
java -cp "my-app-1.jar" "-Dloader.main=liquibase.integration.commandline.LiquibaseCommandLine" org.springframework.boot.loader.launch.PropertiesLauncher --driver=org.postgresql.Driver --changeLogFile=com/my-app1/liquibase/changelog.xml --url=jdbc:postgresql://localhost:5432/db --username=db --password=password update

After running, I get the error:
SEVERE [liquibase.integration] Could not find/read changelogs from changelog directory

  • Caused by: ‘path’ must contain ‘/!’
    liquibase.exception.CommandExecutionException: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find/read changelogs from changelog directory
    at liquibase.command.CommandScope.lambda$execute$6(CommandScope.java:310)
    at liquibase.Scope.child(Scope.java:223)
    at liquibase.Scope.child(Scope.java:199)
    at liquibase.command.CommandScope.execute(CommandScope.java:251)
    at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
    at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
    at picocli.CommandLine.execute(CommandLine.java:2170)
    at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$2(LiquibaseCommandLine.java:412)
    at liquibase.Scope.child(Scope.java:223)
    at liquibase.Scope.child(Scope.java:199)
    at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$3(LiquibaseCommandLine.java:389)
    at liquibase.Scope.child(Scope.java:223)
    at liquibase.Scope.child(Scope.java:199)
    at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:386)
    at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:105)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
    at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
    at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)
    Caused by: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find/read changelogs from changelog directory
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
    at liquibase.command.core.helpers.DatabaseChangelogCommandStep.lambda$getDatabaseChangeLog$0(DatabaseChangelogCommandStep.java:143)
    at liquibase.Scope.lambda$child$0(Scope.java:214)
    at liquibase.Scope.child(Scope.java:223)
    at liquibase.Scope.child(Scope.java:213)
    at liquibase.Scope.child(Scope.java:192)
    at liquibase.Scope.child(Scope.java:280)
    at liquibase.Scope.child(Scope.java:284)
    at liquibase.command.core.helpers.DatabaseChangelogCommandStep.getDatabaseChangeLog(DatabaseChangelogCommandStep.java:138)
    at liquibase.command.core.helpers.DatabaseChangelogCommandStep.run(DatabaseChangelogCommandStep.java:84)
    at liquibase.command.CommandScope.lambda$execute$6(CommandScope.java:263)
    … 28 more
    Caused by: liquibase.exception.SetupException: liquibase.exception.SetupException: Could not find/read changelogs from changelog directory
    at liquibase.changelog.DatabaseChangeLog.handleInclude(DatabaseChangeLog.java:663)
    at liquibase.changelog.DatabaseChangeLog.handleChildNodeHelper(DatabaseChangeLog.java:485)
    at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:470)
    at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:437)
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:23)
    … 38 more
    Caused by: liquibase.exception.LiquibaseException: liquibase.exception.SetupException: Could not find/read changelogs from changelog directory
    at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:1137)
    at liquibase.changelog.DatabaseChangeLog.handleInclude(DatabaseChangeLog.java:652)
    … 42 more
    Caused by: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: Could not find/read changelogs from changelog directory
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
    at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:1109)
    … 43 more
    Caused by: liquibase.exception.SetupException: Could not find/read changelogs from changelog directory
    at liquibase.changelog.DatabaseChangeLog.findResources(DatabaseChangeLog.java:927)
    at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:842)
    at liquibase.changelog.DatabaseChangeLog.handleIncludeAll(DatabaseChangeLog.java:625)
    at liquibase.changelog.DatabaseChangeLog.handleChildNodeHelper(DatabaseChangeLog.java:489)
    at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:470)
    at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:437)
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:23)
    … 44 more
    Caused by: java.io.IOException: Could not find/read changelogs from changelog directory
    at liquibase.changelog.DatabaseChangeLog.getUnsortedResources(DatabaseChangeLog.java:961)
    at liquibase.changelog.DatabaseChangeLog.findResources(DatabaseChangeLog.java:905)
    … 50 more
    Caused by: java.io.IOException: ‘path’ must contain ‘/!’
    at liquibase.resource.ClassLoaderResourceAccessor.search(ClassLoaderResourceAccessor.java:120)
    at liquibase.resource.CompositeResourceAccessor.search(CompositeResourceAccessor.java:51)
    at liquibase.changelog.DatabaseChangeLog.getUnsortedResources(DatabaseChangeLog.java:958)
    … 51 more
    Caused by: java.lang.IllegalArgumentException: ‘path’ must contain ‘/!’
    at org.springframework.boot.loader.net.protocol.nested.NestedLocation.parse(NestedLocation.java:98)
    at org.springframework.boot.loader.net.protocol.nested.NestedLocation.fromUri(NestedLocation.java:89)
    at org.springframework.boot.loader.nio.file.NestedFileSystemProvider.getPath(NestedFileSystemProvider.java:88)
    at java.base/java.nio.file.Path.of(Path.java:208)
    at java.base/java.nio.file.Paths.get(Paths.java:98)
    at liquibase.resource.ZipPathHandler.getResourceAccessor(ZipPathHandler.java:48)
    at liquibase.resource.PathHandlerFactory.getResourceAccessor(PathHandlerFactory.java:37)
    at liquibase.resource.ClassLoaderResourceAccessor.search(ClassLoaderResourceAccessor.java:117)
    … 53 more

Unexpected error running Liquibase: Could not find/read changelogs from changelog directory

Caused by: ‘path’ must contain ‘/!’

When I extract the jar, the dependency is in place in BOOT-INF/lib.

P.S. include file works without problems, but this doesn’t look very good, as I don’t want to go to the changelog every time I add a new script and add another line.