liquibase 中的 sqlFile 重构无法在类路径上找到文件
自定义重构标记的文档表示将在类路径中搜索该文件。 但是,尽管它位于类路径中,但我无法让它找到我的文件。
变更集元素是:
<changeSet author="rebecca" id="9.1 - LoanIQ GoLive">
<comment>No rollback script exists</comment>
<sqlFile path="v9.1-loaniqgolive.sql"/>
</changeSet>
ant 任务是:
<updateDatabase
changeLogFile="@{changelog}"
driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://${database.host}:${database.port};databaseName=${database.name}"
username="${database.user}"
password="${database.password}"
promptOnNonLocalDatabase="false"
dropFirst="false"
classpathref="liquibase.path"/>
构建报告 liquibase 路径是:
[echo] The liquibase path = D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\database;D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\tools\liquibase\liquibase.jar;D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\lib\sqljdbc.jar
我已经确认 v9.1-loaniqgolive.sql 肯定在路径中(第一个元素)。
但我收到此错误:
D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\ant\functions\db.xml:56: liquibase.exception.ChangeLogParseException: Invalid Migration File: <sqlfile path=v9.1-loaniqgolive.sql> -Unable to read file
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:132)
我的配置看起来不错,但它不起作用。我该如何解决这个问题或进一步调试?
The documentation for the <sqlFile>
custom refactoring tag says that the classpath will be searched for the file.
However I cannot get it to find my file, despite it being in the classpath.
The changeset element is:
<changeSet author="rebecca" id="9.1 - LoanIQ GoLive">
<comment>No rollback script exists</comment>
<sqlFile path="v9.1-loaniqgolive.sql"/>
</changeSet>
The ant task is:
<updateDatabase
changeLogFile="@{changelog}"
driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://${database.host}:${database.port};databaseName=${database.name}"
username="${database.user}"
password="${database.password}"
promptOnNonLocalDatabase="false"
dropFirst="false"
classpathref="liquibase.path"/>
The build reports that the liquibase path is:
[echo] The liquibase path = D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\database;D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\tools\liquibase\liquibase.jar;D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\lib\sqljdbc.jar
I have confirmed that v9.1-loaniqgolive.sql is definitely in the path (1st element).
Yet I get this error:
D:\Program Files\Jenkins\jobs\Deploy GMM\workspace\app\build\ant\functions\db.xml:56: liquibase.exception.ChangeLogParseException: Invalid Migration File: <sqlfile path=v9.1-loaniqgolive.sql> -Unable to read file
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:132)
My config looks OK, but it doesn't work. How can I solve this or debug further?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的一个快速建议是使用 -verbose 和 -debug 命令行参数运行 Ant。这会产生大量日志记录,但通常可以帮助您更接近问题的根源。
我将尝试针对我的一个数据库创建一个等效的 Ant 任务,并响应任何更新。
One quick suggestion I have is to run Ant with -verbose and -debug command line parameters. This puts out a lot of logging but generally helps get you closer to the source of the problem.
I will try to create an equivalent Ant task against one of my dbs and respond with any updates.