eclipse中的Liquibase自动完成(maven项目)
我在试着为liquibase做自动补全 我的项目在liquibase中运行良好,但完成却不起作用 我敢肯定,在从liquibase下载javadoc/源代码后,它上周确实起了作用 现在,每当我尝试让eclipse自动完成changelog xml时,我都可以看到: 加载引用语法(休眠) 然后它消失了,自动完成就不起作用了 以下是一个变更集标题示例:eclipse中的Liquibase自动完成(maven项目),eclipse,maven,liquibase,Eclipse,Maven,Liquibase,我在试着为liquibase做自动补全 我的项目在liquibase中运行良好,但完成却不起作用 我敢肯定,在从liquibase下载javadoc/源代码后,它上周确实起了作用 现在,每当我尝试让eclipse自动完成changelog xml时,我都可以看到: 加载引用语法(休眠) 然后它消失了,自动完成就不起作用了 以下是一个变更集标题示例: <?xml version="1.0" encoding="UTF-8"?> <databaseChangeLog xm
<?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>
编辑:很可能是一个代理问题。我曾短暂地完全连接到互联网(不问…),现在它正在工作。不过,我的同事也应该让它工作(我很想理解)。Eclipse应该能够在具有描述符(或其他名称)的XML文件上使用autocomplete 有一些数据库更改集的示例。这些都包括对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中配置代理,请执行以下操作:
窗口>首选项>常规>网络连接Eclipse应该能够对具有描述符(或任何名称)的XML文件使用autocomplete 有一些数据库更改集的示例。这些都包括对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中配置代理,请执行以下操作:
Window>Preferences>General>networkconnections+1为了描述该机制,不确定它是否应该在jar中找到xsd(在这里,但它如何映射到uri?。@ymajoros我不知道Eclipse是否有可能为此在jar中查找xsd文件。但我认为这不值得去弄清楚。我打赌你还有更重要的事情要做;-)@真奇怪。我不是一直上网,但我从来没有遇到过这样的问题。我注意到您没有使用所有的
xsi:schemaLocation
s。也许这就是问题的原因?好吧,看来这是我的代理配置。它在Eclipse有连接时工作。+1用于描述该机制,不确定它是否应该在jar中找到xsd(在这里,但它如何映射到uri?。@ymajoros我不知道Eclipse是否有可能为此在jar中查找xsd文件。但我认为这不值得去弄清楚。我打赌你还有更重要的事情要做;-)@真奇怪。我不是一直上网,但我从来没有遇到过这样的问题。我注意到您没有使用所有的xsi:schemaLocation
s。也许这就是问题的原因?好吧,看来这是我的代理配置。当Eclipse有一个连接时,它工作。