如果我把所有变更集放在一个文件中,它可以正常工作,但如果我这样做:
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<includeAll path="migrations" />
</databaseChangeLog>
然后我得到下面的错误。migrations目录在src/main/resources中,你知道我哪里出错了吗?谢谢
Exception in thread "main" liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: /var/folders/m_/jvmrmqx90n54v276_xvtgxcw0000gn/T/liquibase-unzip5492890813073634394.dir/license/LICENSE.dom-documentation.txt (Not a directory)
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:27)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:225)
at liquibase.Liquibase.update(Liquibase.java:200)
at liquibase.Liquibase.update(Liquibase.java:190)
at liquibase.Liquibase.update(Liquibase.java:186)
at liquibase.Liquibase.update(Liquibase.java:179)
at io.dropwizard.migrations.DbMigrateCommand.run(DbMigrateCommand.java:68)
at io.dropwizard.migrations.DbCommand.run(DbCommand.java:52)
at io.dropwizard.migrations.AbstractLiquibaseCommand.run(AbstractLiquibaseCommand.java:61)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:80)
at uk.co.wansdykehouse.pr.PRApplication.main(PRApplication.java:58)
Caused by: liquibase.exception.SetupException: /var/folders/m_/jvmrmqx90n54v276_xvtgxcw0000gn/T/liquibase-unzip5492890813073634394.dir/license/LICENSE.dom-documentation.txt (Not a directory)
at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:367)
at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:274)
at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:221)
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
... 12 more
Caused by: java.io.FileNotFoundException: /var/folders/m_/jvmrmqx90n54v276_xvtgxcw0000gn/T/liquibase-unzip5492890813073634394.dir/license/LICENSE.dom-documentation.txt (Not a directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at liquibase.util.FileUtil.unzip(FileUtil.java:76)
at liquibase.resource.ClassLoaderResourceAccessor.list(ClassLoaderResourceAccessor.java:87)
at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:344)
... 15 more
编辑:
奇怪的是,这是有效的:
<include file="migrations/00001_initial.xml" />
我回答这个问题可能会迟到。。但我知道这里出了什么问题。在"migrations"之后,您错过了"/"。查看此处以获取参考包括所有文件