Liquibase 中 Oracle 插件的 ChangeSet 始终为空

ChangeSet for Oracle plugin in Liquibase always empty

我已经下载了适用于 Liquibase 的 Oracle 插件,我已经使用 maven 构建了它,并将 liquibase-oracle-3.3-SNAPSHOT.jar 复制到 Liquibase 主目录的 /lib 目录中。 如文档中所述,我已将命名空间添加到 changeLog 文件中,这是我的 changeLog 文件:

  <databaseChangeLog
 xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:ora="http://www.liquibase.org/xml/ns/dbchangelog-ext"
 xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<changeSet author="myAuthor" id="xxx">
    <ora:encapsulateTableWithView tableName="TABLENAME"/>
</changeSet>
</databaseChangeLog>

通过 CLI 的更新操作总是成功的,但在数据库上没有任何反应:DATABASECHANGELOG table 中引用此操作的行是正确的,但在描述列中报告 "empty"。

我还在 liquibase.properties 文件的类路径中添加了 liquibase-oracle-3.3-SNAPSHOT.jar,但是没用。 在 DATABASECHANGELOG table 中跟踪的每个具有特定 Oracle 插件标记的 changeSet 都具有相同的校验和 (7:d41d8cd98f00b204e9800998ecf8427e) 并在 DESCRIPTION."empty" 中报告。

有什么想法吗?

我发现了问题所在:我通过 CLI 命令启动

java -jar liquibase.jar --changeLogFile=myChangeLog.xml update

但是 changeSet 结果总是空的:这是因为 liquibase.jar 没有从 liquibase-oracle-3.3-SNAPSHOT.jar 中获取 类。我在 PATH 的环境变量中添加了 liquibase.bat,新命令是

liquibase --changeLogFile=myChangeLog.xml update

而且效果很好。