Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 272
Andrew Machen Avatar asked Jun 03 '15 19:06

Andrew Machen


People also ask

What is Tycho build?

Tycho is a set of Maven plug-ins for building Eclipse plug-ins, features, products and OSGi bundles. A Tycho build is configured via one or multiple pom. xml files. You need at least one pom file for configuring the Tycho configuration.

What is Tycho Java?

Eclipse Tycho™ is a manifest-first way to build. Eclipse Platform plug-ins/OSGi bundles. Eclipse Platform Features. Eclipse Update sites/p2 repositories.


2 Answers

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.

like image 83
gillesB Avatar answered Sep 21 '22 16:09

gillesB


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.

like image 30
not2savvy Avatar answered Sep 20 '22 16:09

not2savvy