You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Database Vendor & Version: I tested with Postgres and Oracle
Operating System Type & Version: I tested on macOS and Linux
Description
I appears as if the Maven plugin ignores its changeLogDirectory parameter or gives precedence to the classpath. The consequence is that it finds the changelog file selected through the changeLogFile parameter in two places.
Steps To Reproduce
Prepare a database of choice e.g. Postgres.
Use basic Maven project structure.
Place a changelog file db/changelog/db.changelog-master.xml in src/main/resources.
Run a Maven build e.g. mvn package. Maven will copy all resources to target/classes.
Liquibase scans the classpath for the configured changelog file and finds it in two places:
[ERROR] Error Reading Changelog File: Found 2 files that match db/changelog/db.changelog-master.xml:
file:/some-dir/target/classes/db/changelog/db.changelog-master.xml,
file:/some-dir/src/main/resources/db/changelog/db.changelog-master.xml
Expected/Desired Behavior
Since I explicitly set -Dliquibase.changeLogDirectory="src/main/resources" Liquibase should only look in src/main/resources in which case it would not find two changelog files.
Additional Context
Several other issues were reported about such behavior but none specific to Maven e.g. #2818. Their potential fix through #3119 does not apply here as the changelog folder is defined.
The text was updated successfully, but these errors were encountered:
Environment
Liquibase Version: 4.9.1
Liquibase Integration & Version: Maven
Database Vendor & Version: I tested with Postgres and Oracle
Operating System Type & Version: I tested on macOS and Linux
Description
I appears as if the Maven plugin ignores its
changeLogDirectory
parameter or gives precedence to the classpath. The consequence is that it finds the changelog file selected through thechangeLogFile
parameter in two places.Steps To Reproduce
db/changelog/db.changelog-master.xml
insrc/main/resources
.mvn package
. Maven will copy all resources totarget/classes
.Actual Behavior
Liquibase scans the classpath for the configured changelog file and finds it in two places:
Expected/Desired Behavior
Since I explicitly set
-Dliquibase.changeLogDirectory="src/main/resources"
Liquibase should only look insrc/main/resources
in which case it would not find two changelog files.Additional Context
Several other issues were reported about such behavior but none specific to Maven e.g. #2818. Their potential fix through #3119 does not apply here as the changelog folder is defined.
The text was updated successfully, but these errors were encountered: