Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Dependency to an osgi bundle in manifest first build

Hi all,
I have a problem. My project is like to add to a plugin in the demo project itp04 a dependency to wrapped 3rd party library like tycho.demo.itp02.pomfirst-thirdparty in itp02.

I would have :
* tycho.demo.itp02.pomfirst-thirdparty in itp02 stays just like in the demo project
* itp04-rcp/example-bundle requires on tycho.demo.itp02.pomfirst-thirdparty
* features and repository in itp04 are not modified

I managed to add pomfirst-thirdparty bundle to example-bundle by doing :
* in itp04-rcp/pom.xml, i've configured <pomDependencies>consider</pomDependencies> in target-platform-configuration
* in example-bundle/pom.xml, i've added dependency to pomfirst-thirdparty artifact
* in example-bundle/META-INF/MANIFEST.MF, i've added tycho.demo.itp02.pomfirst-thirdparty in Required-bundle section
* in example-feature/pom.xml, i've added dependency to example-bundle

But then when I build, it fails on eclipse-repository, I have this error :

[INFO] Resolving dependencies of MavenProject: example.group:eclipse-repository:1.0.0-SNAPSHOT @ /work/sources/tycho/org.eclipse.tycho-demo/itp04-rcp/eclipse-repository/pom.xml
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1, osgi.ws=win32, osgi.os=win32, osgi.arch=x86, org.eclipse.update.install.features=true, org.osgi.framework.system.packages=}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: example.product.id 0.1.0.qualifier
[ERROR]   Missing requirement: example-bundle 0.1.0.qualifier requires 'bundle tycho.demo.itp02.pomfirst-thirdparty 0.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: example-feature.feature.group 0.1.0.qualifier depends on: example-bundle 0.0.0
[ERROR]   Cannot satisfy dependency: example.product.id 0.1.0.qualifier depends on: example-feature.feature.group 0.0.0
[ERROR] 
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from example-bundle 0.1.0.qualifier to bundle tycho.demo.itp02.pomfirst-thirdparty 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from example-bundle 0.1.0.qualifier to bundle tycho.demo.itp02.pomfirst-thirdparty 0.0.0.", "No solution found because the problem is unsatisfiable."]

If I remove eclipse-repository from itp04-rcp/pom.xml, plugin and feature are build correctly. But eclipse-respository still fails when I build it separatly.

My questions are :
* do I really need to migrate ipt04 to a pom-first style project ?
* how can I add the dependency to pomfirst-thirdparty in manifest-first ?
* do you have an example for this case ?

Thanks,
Vincent

Back to the top