Eclipse XMLEditor示例项目的Maven + Tycho缺少POM的未解决依赖项

时间:2019-09-18 17:54:17

标签: maven tycho eclipse-pde

我为此困扰了近一个星期。我正在尝试为公司的其中一个DSL创建一个eclipse编辑器插件。

我跟随this tutorial建立了插件,功能和更新站点。清洁和验证工作正常,因为实际上没有任何东西!我确实收到有关必须至少包含一个扩展或扩展点的插件的警告。

然后我使用Eclipse中的扩展向导为基本XML编辑器添加扩展:

enter image description here

这将添加4个依赖项:

enter image description here

现在,当我运行Error CS1061时,出现无法解决依赖关系的错误消息:

mvn clean verify

在父项目POM中,我有Eclipse发布存储库,如下所示:

[INFO] Scanning for projects...
C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties
C:\ui\features\com.mycompany.example.ui.feature\.polyglot.build.properties
[INFO] Computing target platform for MavenProject: com.mycompany.example.ui:com.mycompany.example.ui.editors.ontology:1.0.0-SNAPSHOT @ C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties
[INFO] Resolving dependencies of MavenProject: com.mycompany.example.ui:com.mycompany.example.ui.editors.ontology:1.0.0-SNAPSHOT @ C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties
[INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: com.mycompany.example.ui.editors.ontology 1.0.0.qualifier
[ERROR]   Missing requirement: com.mycompany.example.ui.editors.ontology 1.0.0.qualifier requires 'osgi.bundle; org.eclipse.core.runtime 0.0.0' but it could not be found
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: com.mycompany.example.ui:com.mycompany.example.ui.editors.ontology:1.0.0-SNAPSHOT @ C:\ui\bundles\com.mycompany.example.ui.editors.ontology\.polyglot.build.properties: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

任何帮助将不胜感激!我也了解Xtext,但是我们已经有了很多解析/建模/验证基础结构,我希望以此为编辑器的基础,而不是在xtext中重新创建DLS只是为了获得一个编辑器,然后拥有两个语法保持同步。

1 个答案:

答案 0 :(得分:2)

Maven 3.6.1(https://issues.apache.org/jira/browse/MNG-6642)中还有另一个Bug可以阻止

<repository>
    <id>eclipse-release</id>
    <url>${eclipse-repo.url}</url>
    <layout>p2</layout>
</repository>

从工作开始。因此请使用3.6.0(如果找到其他错误的解决方法,请使用3.6.2)

或者您使用真实的目标平台而不是该回购清单 https://wiki.eclipse.org/Tycho/Target_Platform#Target_files

相关问题