问题
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
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/30629469/tycho-build-error-requires-bundle-but-it-could-not-be-found