Tycho构建错误:“......需要捆绑......但无法找到它”

时间:2015-06-03 19:56:48

标签: eclipse plugins eclipse-rcp tycho

我们有一个eclipse Luna插件应用程序,我们正试图用Tycho构建。当我们尝试mvn clean verify时,我们会收到此类消息:

[ERROR]  Cannot resolve project dependencies:
[ERROR]   Software being installed: our.app 1.0.0.qualifier
[ERROR]   Missing requirement: our.app 1.0.0.qualifier requires 'bundle org.eclipse.core.runtime 3.7.0' but it could not be found

当我们查看日志时,似乎所需的任何Eclipse插件都会给我们这个错误,而这只是MANIFEST.MF列表中第一个被验证插件的项目。

我已经查看了其他问题,但似乎没有一个问题可以解决这个问题。任何建议都将不胜感激。

MANIFEST.MF:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Our App
Bundle-SymbolicName: our.app;singleton:=true
Built-By: Our Team (2014)
Bundle-ClassPath: .,
 <some jars>
Bundle-Vendor: Our Team
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
 org.eclipse.ui;bundle-version="3.7.0",
 org.eclipse.ui.ide;bundle-version="3.7.0",
 org.eclipse.core.resources;bundle-version="3.7.0",
 org.eclipse.ui.forms;bundle-version="3.6.0",
 org.eclipse.wst.sse.ui;bundle-version="1.3.0",
 org.eclipse.jface.text;bundle-version="3.8.100",
 org.eclipse.ui.workbench.texteditor;bundle-version="3.8.101",
 org.eclipse.ui.views;bundle-version="3.6.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Version: 1.0.0.qualifier

2 个答案:

答案 0 :(得分:4)

如果我从pom中删除<repository> - 标记,我会收到类似的错误。 没有这些信息,Tycho不知道在哪里下载所需的软件包。 因此,您必须将以下代码段添加到您的pom:

<repository>
   <id>eclipse-indigo</id>
   <url>http://download.eclipse.org/releases/indigo</url>
   <layout>p2</layout>
</repository>

我从here复制了代码段,有关详情,请查看here

答案 1 :(得分:3)

Tycho读取您的MANIFEST.MF和feature.xml以查找插件的依赖项,并将它们(临时)添加到您的POM中,Maven将使用它来执行构建。 Tycho的想法是仅在MANIFEST.MF和feature.xml中维护依赖关系,使您无需将它们添加到POM中。但是,您仍然需要添加一个适当的存储库,通常位于父POM中,可以在其中找到相关插件。这显然在您的POM中缺失。