【发布时间】:2017-06-03 00:11:46
【问题描述】:
我正在尝试组织我的变更集,以便每个文件有一个变更集元素,正如Liquibase Best Practices 所暗示的那样,但是当我尝试在我的 Liquidbase xml 文件上使用 validate 命令时出现以下错误。
liquibase: cvc-elt.1: 找不到元素的声明 '更改集'。 liquibase:作为 SAXException 引发的错误:解析错误 ./1.xml 的第 3 行第 38 列:cvc-elt.1:找不到声明 元素'changeSet'。
我做错了什么?
master.xml:
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="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">
<include file="./1.xml"/>
<include file="./2.xml"/>
</databaseChangeLog>
1.xml:
<?xml version="1.0" encoding="utf-8" ?>
<changeSet id="1" author="me">
<createTable
tableName="CLIENTS"
...
</createTable>
</changeSet >
【问题讨论】:
-
将 pom.xml 中的 Liquibase 插件版本设置为最新 => mvnrepository.com/artifact/org.liquibase/liquibase-maven-plugin