Hi David,
The thing I have been missing all along was where the osgi extenders were to be
found.
Although it is mentioned in your Spi-Fly page, I totally missed/ignored it.
It was not until l found some more info about Spi-Fly in Alex Blewitt's book "Mastering Eclipse
Plugin Development" that a big "in your face" note stood out..
NOTE
The|org.apache.aries.spifly.dynamic.bundle|needs|org.apache.aries.util|to resolve,
and|org.objectweb.asm-all|to perform the bytecode weaving. It is possible to pre-weave a bundle
using|org.apache.aries.spifly.static.bundle|as documented on the home
pageathttp://aries.apache.org/modules/spi-fly.html.
Then everything fell into place.
My avoidance so far of serious involvement with Maven probably was the main
cause of my problems...
Thank you for your patience and assistance,
Regards
Paul
On 12/07/2017 11:02 PM, David Bosschaert wrote:
Hi Paul,
On 12 July 2017 at 13:12, Paul F Fraser <pa...@a2zliving.com
<mailto:pa...@a2zliving.com>> wrote:
Hi David,
I had a quick look at the examples but did not get far as some/most of the
examples are poms
and I did not proceed. I will have another look.
Just a couple of questions,
In my case I wrapped the acme4j jars in a bundle and manually added a
META_INF.services folder
then followed a suggestion of Peter's
sometime ago to add
Private-Package: META-INF.services.*; -split-package:=merge-first
This seems to do what is necessary in the generated mapped bundle.
Is this the way to go?
Also
When using a wrapped bundle does the wrapped bundle and the application
using it BOTH have to
have the added Provide and/or Require Capabilities as per your blog or just
the wrapped bundle.
I could not follow this from the blog, not your fault, probably mine :-)
Since examples might be the best to get you going, here are some that come close to what you're
doing (I hope).
The spi-fly-example-provider2-bundle [1] shows the Provide-Capability header that the provider
should have and the spi-fly-example-client2-bundle [2] should the Require-Capability that a
consumer should have. There is also an example that has an embedded jar file [3] but that uses the
'proprietary' Aries headers. However you can just use the same headers as are used with [1] in
that case.
However, these are just examples, the authorative info can be found in chapter 133 of the
Enterprise Spec [4].
Best regards,
David
PS. I don't think I every had to do a Private-Package instruction like you have, but this may
depend on the tooling settings and it shouldn't do any harm.
[1]
https://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle
[2]
https://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle
[3]
https://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-bundle
[4] https://osgi.org/members/Specifications/HomePage
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev