digimead / sbt-osgi-manager

OSGi development bridge based on Bndtools and Tycho.
http://digimead.github.io/sbt-osgi-manager/
Apache License 2.0
6 stars 2 forks source link

Question about missing dependency during resolving #7

Open reyman opened 8 years ago

reyman commented 8 years ago

Hi, I'm trying to resolve a P2 repository :

libraryDependencies in OSGiConf += typeP2(OSGi.ECLIPSE_PLUGIN % "msi.gama.headless" % OSGi.ANY_VERSION withSources)

But i have an error due to unresolved dependency.

osgiResolveRemote

[info] [OSGi manager:gama-plugin-codingcamp2016] Resolve P2 dependencies
[info] [OSGi manager:*] Initialize Maven core. Maven version: 3.3.9
[info] [OSGi manager:*] Adding repository http://eclipse.ialto.com/eclipse/updates/4.2/R-4.2.1-201209141800
[info] [OSGi manager:*] Fetching p2.index from http://vps226121.ovh.net/updates/ (173B)
[info] [OSGi manager:*] Fetching p2.index from http://vps226121.ovh.net/updates/ (173B)
[info] [OSGi manager:*] Adding repository http://vps226121.ovh.net/updates
[info] [OSGi manager:*] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[error] [OSGi manager:*] Cannot resolve project dependencies:
[error] [OSGi manager:*] Cannot resolve project dependencies:
[error] [OSGi manager:*]   Software being installed: msi.gama.headless 1.7.0.201605261327
[error] [OSGi manager:*]   Software being installed: msi.gama.headless 1.7.0.201605261327
[error] [OSGi manager:*]   Missing requirement: msi.gama.core 1.7.0.201605221215 requires 'package org.apache.commons.lang 2.4.0' but it could not be found
[error] [OSGi manager:*]   Missing requirement: msi.gama.core 1.7.0.201605221215 requires 'package org.apache.commons.lang 2.4.0' but it could not be found
[error] [OSGi manager:*]   Missing requirement: msi.gama.core 1.7.0.201605261327 requires 'package org.apache.commons.lang 2.4.0' but it could not be found
[error] [OSGi manager:*]   Missing requirement: msi.gama.core 1.7.0.201605261327 requires 'package org.apache.commons.lang 2.4.0' but it could not be found
[error] [OSGi manager:*]   Cannot satisfy dependency: msi.gama.headless 1.7.0.201605221215 depends on: bundle msi.gama.core 1.7.0
[error] [OSGi manager:*]   Cannot satisfy dependency: msi.gama.headless 1.7.0.201605221215 depends on: bundle msi.gama.core 1.7.0
[error] [OSGi manager:*]   Cannot satisfy dependency: msi.gama.headless 1.7.0.201605261327 depends on: bundle msi.gama.core 1.7.0
[error] [OSGi manager:*]   Cannot satisfy dependency: msi.gama.headless 1.7.0.201605261327 depends on: bundle msi.gama.core 1.7.0

Is there a way to inject these dependency during resolving by sbt-osgi-manager or the only way to do is to modify the p2 site to add these missing dependencies ?

ezh commented 8 years ago

Since the plugin is a wrapper for Tycho the question is: Is there a way to inject dependency in Tycho? I suspect yes. There is something that they named a 'reactor project'. I have no deep knowledge of Tycho for my shame. If you really want this feature then you should

  1. ask this question in tycho-dev@eclipse.org. There is a reasonable friendly community. I read it too. Or if you already know - please describe such behavior. https://github.com/digimead/sbt-osgi-manager/blob/master/src/main/scala/sbt/osgi/manager/tycho/ResolveP2.scala#L93 <-- HERE line 93-107
  2. create test case for this feature
  3. one of us will add the new code to the plugin
reyman commented 8 years ago

Sorry for delay, thanks for answer, finally we find another way to solve this problem :) I take the time to ask one or two question about tycho on the list, so thanks for the link.