In order to use a R5 repository, you can do the following.

<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"; name="test">
<resource-repository>
https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/index.xml
</resource-repository>
<feature name="test">
<requirement>
osgi.wiring.package;filter:="(&amp;(osgi.wiring.package=osgi.enroute.dto.api)(version>=1.0.0)(!(version>=2.0.0)))"
</requirement>
</feature>
</features>

However, using this very simple file leads to the following:


*karaf*@root()> feature:install --verbose --simulate test

Adding features: test/[0,0.0.0]

Changes to perform:

  Region: root

    Bundles to install:


https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/org.apache.felix.log/org.apache.felix.log-1.0.1.jar


https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/org.apache.felix.scr/org.apache.felix.scr-2.0.0.jar


https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/org.eclipse.osgi/org.eclipse.osgi-3.10.100.jar


https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/org.knopflerfish.bundle.useradmin/org.knopflerfish.bundle.useradmin-4.1.1.jar


https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/osgi.enroute.dtos.bndlib.provider/osgi.enroute.dtos.bndlib.provider-1.0.0.jar


https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/osgi.promise/osgi.promise-6.0.0.jar

But I don't guarantee the results... nor its usability, it really depends
on the content of the index.xml.

Guillaume


2016-09-20 15:19 GMT+02:00 <t...@quarendon.net>:

> I'm tracking down a rather odd problem trying to deploy a bundle into
> Karaf. The
> issue appears to be with the osgi.enroute.dto.api package.
>
> I'm getting this resolution error from Karaf:
>
> missing requirement: osgi.wiring.package;
> filter:="(&(osgi.wiring.package=osgi.enroute.dto.api)(
> version>=1.0.0)(!(version>=2.0.0)))"
>
> So I don't have anything that provides the osgi.enroute.dto.api package.
>
> I have the Karaf obr festure installed, and it's set up to point to
> https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/
> cnf/distro/index.xml
>
> So I *think* it ought to just find whatever it needs by just looking in
> that
> OBR. Nice.
>
> Looking at the runbundles list in the bndrun file I have, it shows
> "osgi.enroute.dto.bndlib.provider". At a guess this is where bndtools has
> resolved that capability. Indeed, if I look at the MANIFEST for that jar,
> I see
>
> Export-Package: osgi.enroute.dto.api;version="1.0.0"
>
> If I use Karaf to list the information about that JAR though, it shows:
> Requires:package:(&(package=osgi.enroute.dto.api)(version>
> =1.0.0)(!(version>=1.1.0)))
> Karaf is just showing the information in the
> https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/
> cnf/distro/index.xml
> file here.
>
> So, on the one hand, the osgi.enroute.dto.bndlib.provider.jar file says it
> exports the package, but on the other hand the OBR index says that it has a
> requirement on that package.
>
> On the face of it, this seems like a contradiction. Indeed if I install
> that
> bundle into Karaf, it complains of:
> Unsatisfied Requirements:
> [osgi.enroute.dto.bndlib.provider [60](R 60.0)] osgi.wiring.package;
> (&(osgi.wiring.package=osgi.enroute.dto.api)(version>=1.0.
> 0)(!(version>=1.1.0)))
>
> Equally if I create a very simple bundle that just has:
>    @Reference private osgi.enroute.dto.api.DTOs dtos;
>
> I don't seem to be able to deploy it within Karaf, bundle:diag shows:
>
> Unsatisfied Requirements:
> [simple.dtousage [63](R 63.0)] osgi.wiring.package;
> (&(osgi.wiring.package=osgi.enroute.dto.api)(version>=1.0.
> 0)(!(version>=2.0.0)))
> [simple.dtousage [63](R 63.0)] osgi.service;
> (objectClass=osgi.enroute.dto.api.DTOs)
>
>
> Is this an issue with the bundle? Or the bnd index? Or with karaf?
> Or am I misinterpreting?
>
> Thanks.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gno...@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Reply via email to