【发布时间】:2019-09-18 17:54:17
【问题描述】:
我被这个问题难住了将近一个星期。我正在尝试为我公司的一个 DSL 创建一个 Eclipse 编辑器插件。
我关注this tutorial 设置插件、功能和更新站点。清理并验证按预期工作,因为那里真的什么都没有!我确实收到关于插件必须包含至少一个扩展或扩展点的警告。
然后我使用 Eclipse 中的扩展向导为基本 XML 编辑器添加一个扩展:
这增加了 4 个依赖项:
现在,当我运行 mvn clean verify 时,我收到关于无法解决依赖关系的错误:
[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
在父项目 POM 中,我有 eclipse 发布存储库,如下所示:
<properties>
<eclipse-repo.url>https://download.eclipse.org/releases/2019-06/</eclipse-repo.url>
</properties>
<repositories>
<repository>
<id>eclipse-release</id>
<url>${eclipse-repo.url}</url>
<layout>p2</layout>
</repository>
</repositories>
任何帮助将不胜感激!我也知道 Xtext,但我们已经有一堆解析/建模/验证基础设施,我希望将其用作编辑器的主干,而不是在 xtext 中重新创建 DLS 只是为了获得一个编辑器然后拥有两个语法保持同步。
【问题讨论】:
-
你使用哪个 maven 版本?
-
@ChristianDietrich 我已经尝试在 Eclipse 中嵌入 3.6.1(2019-06)并为用户安装了 3.5.4 和 3.6.1。 3.6.2 有这个bug
标签: maven tycho eclipse-pde