Changelog with includeAll will not find child changelogs in multi-modules executed by Maven

Description

Consider a Spring Boot multi-modules project with a db/changelog/db.changelog-master.xml containing the includeAll element.

1 2 3 4 5 6 <includeAll path="classpath*:db/changelog/v1/" relativeToChangelogFile="false" errorIfMissingOrEmpty="true" filter="com.devnied.liquibase.includemulti.ChangeLogFilter" />

The example project structure:

1 2 3 4 5 6 7 8 9 10 11 ├── core │   ├── pom.xml │   └── src/main/resources/db │   └── changelog │   ├── db.changelog-master.xml │   └── v1 │   └── changelog-20190715-130722.xml ├── pom.xml └── transverse ├── pom.xml └── src/main/resources/db/changelog/v1/changelog-20190715-124556.xml

Currently, liquibase load only the changelog from core: changelog-20190715-130722.xml when executed by Maven. When executed by Intellij everything works well. That's because Maven builds a classpath with core module with target/classes directory and dependent transverse module as jar. Intellij loads both to target/classes directory.

This is follow up to https://liquibase.jira.com/browse/CORE-3213. As the original issue wasn't fixed.

Example project: https://github.com/cardil/liquibase-multimodule (Just run mvn verify to reproduce error)

Culprit is liquibase.integration.spring.SpringLiquibase.SpringResourceOpener#list as in line 561 Spring resource loader properly located 2 resources, but the loop leaves only one.

Environment

Windows 7, OpenJDK 8.0.212, Spring Boot 2.1.6

Status

Assignee

Unassigned

Reporter

Krzysztof Suszyński

Labels

None

Affects versions

3.6.3

Priority

Major
Configure