Grails 4:数据库迁移插件问题
Grails 4 : Database Migration plugin issue
自从升级到 Grails 4 后,迁移脚本似乎没有从它们的配置位置加载。这会导致以下错误;
liquibase.exception.ChangeLogParseException:
java.lang.IllegalArgumentException: Script text to compile cannot be
null!
到目前为止,我只在 gradle 配置上指定了位置;
sourceSets {
main {
resources {
srcDir 'grails-app/migrations'
}
}
}
我已经添加了插件提供的额外配置,但无济于事;
grails.plugin.databasemigration.changelogLocation = 'grails-app/migrations'
通过调试,我可以看到 grails-app/migrations
路径似乎没有添加到位置列表中,但也发现 grails-app/conf
是,所以我暂时把它们都放在那里瞧...应用程序启动了。
有人知道这是插件的已知问题还是缺少配置?
如 the github issue comment here 所示,gradle 配置文件中的 sourceSets
声明必须位于 dependencies
声明之上。
自从升级到 Grails 4 后,迁移脚本似乎没有从它们的配置位置加载。这会导致以下错误;
liquibase.exception.ChangeLogParseException: java.lang.IllegalArgumentException: Script text to compile cannot be null!
到目前为止,我只在 gradle 配置上指定了位置;
sourceSets {
main {
resources {
srcDir 'grails-app/migrations'
}
}
}
我已经添加了插件提供的额外配置,但无济于事;
grails.plugin.databasemigration.changelogLocation = 'grails-app/migrations'
通过调试,我可以看到 grails-app/migrations
路径似乎没有添加到位置列表中,但也发现 grails-app/conf
是,所以我暂时把它们都放在那里瞧...应用程序启动了。
有人知道这是插件的已知问题还是缺少配置?
如 the github issue comment here 所示,gradle 配置文件中的 sourceSets
声明必须位于 dependencies
声明之上。