handling dependencies and WAR as classpath
Description
Environment
windows and linux
Attachments
1
Activity
Show:
Nathan Voxland January 8, 2015 at 5:57 AM
Fixed. Your test now returns 3 changeSets with status

Maciej December 15, 2014 at 11:49 AM
checked current 3.3.1 release and still it does not find everything properly in provided test app:
c:\>java -jar liquibase.jar --classpath=target\app.war status --verbose
2 change sets have not been applied to postgres@jdbcostgresql://localhost:5432/template1
db/changesets/changeset-mod1-001.xml::mod1-001::test
db/changesets/changeset-mod2-001.xml::mod2-001::test
Liquibase 'status' Successful
while there should be also one changeset from main app:
db/changesets/changeset-app-001.xml::app-001::test
Nathan Voxland December 5, 2014 at 9:06 PM
Fixed with

Maciej November 26, 2014 at 2:11 PM
could you confirm everything is clear and you can reproduce this problem?
When dealing with maven projects with dependencies that can also contain changesets includeAll is broken and does not scan everything as expected. there are also differences in handling such dependencies between maven plugin and command line.
3.1.1
maven plugin works ok for paths like "db/changesets" it looks in every dependency and in main project too.
command line throws "SAXException: includeAll path db/changesets/ could not be found" for path without leading slash, and with slash it ignores changesets from main app (only sees from dependencies)
anyway - different configuration (leading slash) makes it impossible to use maven and commandline simultaneously as it sees migrations differently and tries to load them twice.
3.2.x, 3.3.x - after resource accessor changes makes it even worse:
maven plugin sees changesets from only one dependency (and not from main app), ignoring other locations
commandline also requires leading slash to find anything, although it finds only migrations from single dependency and not from main app, and without leading slash it does not find anything, but does not report any error.
provided test maven project with two modules as dependencies and one webapp. each one has one changeset in same path: db/changesets/ so running liquibase on webapp project should load 3 changesets (and maven plugin up to 3.1.1 works that way). Feel free to experiment with options (maven plugin version and main changelog)
If any additional information is required please let me know...