Liquibase performs a set of changes several times in a single Maven assembly

I observe some strange Liquibase behavior when I run a simple Maven project in the TeamCity build agent.

Maven project structure:

changelogs/
databaseChangeLog.xml
pom.xml

Run command: mvn liquidibase: update

databaseChangeLogs.xml contains the following line: <includeAll path="changelogs/"/>

But the build log contains duplicate entries:

liquibase: databaseChangeLog.xml: /home/teamcity/BuildAgent/work/28fe713da351c06d/changelogs/1.xml: ChangeSet /home/teamcity/BuildAgent/work/28fe713da351c06d/changelogs/1.xml ran successfully in 40ms

liquibase: databaseChangeLog.xml:  Custom SQL executed
liquibase: databaseChangeLog.xml: changelogs/1.xml: ChangeSet changelogs/1.xml ran successfully in 36ms

It seems that Liquibase twice selects a set of changes from different places: from the assembly build folder and the project root.

Does anyone encounter the same issue? Any ideas how to fix this?

+4
source share
1 answer

Liquibase , "" . ​​, logicalFilePath databaseChangeLog, changeSet. , .

+5

All Articles