Tycho build error: "... requires bundle ... but it could not be found"
Asked Answered
E

2

8

We have an eclipse Luna plugin application which we're trying to build with Tycho. When we try to do a mvn clean verify, we're getting this type of message:

[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

When we look at the logs it appears that any Eclipse plugin that is required will give us this error, and that this is merely the first item in the list on the MANIFEST.MF for the plugin being verified.

I have looked at other questions, but none of them seem to address this particular issue. Any suggestions would be greatly appreciated.

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
Exo answered 3/6, 2015 at 19:56 Comment(2)
When I add dependencies, I go to the plugin.xml in my project, click the dependencies tab, add, and then add the required dependency.Palaeontology
The next line of the error message is [ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help. Did you look at that page?Mnemonic
G
7

I get a similar error if I remove the <repository>-tag from the pom. Without that information Tycho does not know where to download the required packages. Therefore you have to add the following snippet to your pom:

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

I copied the snippet from here, for more information look here.

Greenwood answered 4/6, 2015 at 6:57 Comment(1)
I had a similar error, as Tycho doesn't find my plugins, and i resolved this by adding the local repository. Thanks.Penland
I
6

Tycho reads your MANIFEST.MF and feature.xml to find the dependencies of your plugins and adds them (temporarily) to your POMs which are used by Maven to perform the build. The idea of Tycho is to maintain the dependencies solely in the MANIFEST.MF and feature.xml, freeing you from the need to add them to the POMs, too. However, you still need to add an appropriate repository, usually in the parent POM, in which the dependent plugins can be found. This is obviously missing in your POMs.

Incontestable answered 4/6, 2015 at 17:41 Comment(1)
Thank you! This is correct, and worked. I tried to mark both answers correct but it's not letting mark your answer.Exo

© 2022 - 2024 — McMap. All rights reserved.