日食中的Liquibase自动完成(maven项目)

时间:2012-09-10 10:24:00

标签: eclipse maven liquibase

我正在尝试自动完成liquibase。

我的项目与liquibase工作正常,但完成不起作用。

我很确定它在上周从liquibase下载javadoc /来源后确实有效。

现在,每当我尝试使用eclipse自动完成更改日志xml时,我都可以看到:

  

加载参考语法(睡眠)。

然后消失,自动完成功能无效。

以下是变更集标题的示例:

<?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">

    <!--  This changelog is used to validate that liquibase works -->
    <changeSet id="1" author="majoros" >
    </changeSet>

</databaseChangeLog>

编辑:很可能是代理问题。我曾短暂地完全连接到互联网(不要问......),现在它正在运作。尽管如此,我的同事也应该让它工作(我想了解)。

1 个答案:

答案 0 :(得分:3)

Eclipse应该能够在具有描述符(或其任何名称)的XML文件上使用自动完成。

Liquibase's wiki有一些数据库更改集的示例。这些都包括对xsd文件的引用。这些提供了有关XML结构的信息。

1.9的示例XML:

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

2.0的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-2.0.xsd
    http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
</databaseChangeLog>

Eclipse从Web获取xsd文件,因此需要Internet连接。如果您在代理后面,则必须配置Eclipse以使用代理。这可以解释为什么它最初不起作用。

在Eclipse中配置代理:

窗口&gt;偏好&gt;一般&gt;网络连接