ProvToolbox
ProvToolbox copied to clipboard
Turn it into an OSGI bundle
Hi all, I want to change it to an OSGI bundle. I follow the tutorial here: I just added maven dependency part to my bundle A, which wants to use org.openprovenance.prov/prov-interop. The OSGI container I used is karaf, and my bundle has karaf-verify goal. However, the error message is shown as belows.
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-mylogger; type=karaf.feature; version=2.5.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-mylogger)(type=karaf.feature)(version>=2.5.0.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-mylogger/2.5.0.SNAPSHOT: missing requirement [openhab-binding-mylogger/2.5.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.mylogger; type=osgi.bundle; version="[2.5.0.202001050757,2.5.0.202001050757]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.mylogger/2.5.0.202001050757: missing requirement [org.openhab.binding.mylogger/2.5.0.202001050757] osgi.wiring.package; filter:="(osgi.wiring.package=org.openprovenance.prov.interop)"]]
I checked the prov.interop in my .m2 local repo, and found that the manifest file does not export any content. I think this is the reason why the error happened. Can anyone help me solve this?
Thanks for the email. I am not too familiar with the internal workings of OSGI. However, it is my belief that you need to configure the pom.xml files to produce bundles rather than jar files as per
https://www.baeldung.com/osgi
Regards,
-- Professor Luc Moreau, Head of Department Department of Informatics, King’s College London Strand Campus, Bush House, 30 Aldwych, London, WC2B 4BG. Tel: +44 207 848 6808, web: https://nms.kcl.ac.uk/luc.moreau/https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnms.kcl.ac.uk%2Fluc.moreau%2F&data=01%7C01%7Cluc.moreau%40kcl.ac.uk%7Cb86b7dc3862647040ff308d70611a6ae%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Xc8kT1rwPqQ3aeCARMIkFoULEy65Bah%2FR3sjk10GUsw%3D&reserved=0
From: wang70880 [email protected] Reply to: lucmoreau/ProvToolbox [email protected] Date: Sunday, 5 January 2020 at 08:27 To: lucmoreau/ProvToolbox [email protected] Cc: Subscribed [email protected] Subject: [lucmoreau/ProvToolbox] Turn it into an OSGI bundle (#163)
Hi all, I want to change it to an OSGI bundle. I follow the tutorial here:https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flucmoreau.wordpress.com%2F2014%2F08%2F01%2Fprovtoolbox-tutorial-1-creating-and-saving-a-prov-document%2F&data=01%7C01%7Cluc.moreau%40kcl.ac.uk%7C7928d39b137046877d9808d791b9147a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=uO4%2FeWDEhTUaEFOOx9ch%2FRn4UHtzYC8xeXuzMHmxNSc%3D&reserved=0 I just added maven dependency part to my bundle A, which wants to use org.openprovenance.prov/prov-interop. The OSGI container I used is karaf, and my bundle has karaf-verify goal. However, the error message is shown as belows.
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-mylogger; type=karaf.feature; version=2.5.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-mylogger)(type=karaf.feature)(version>=2.5.0.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-mylogger/2.5.0.SNAPSHOT: missing requirement [openhab-binding-mylogger/2.5.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.mylogger; type=osgi.bundle; version="[2.5.0.202001050757,2.5.0.202001050757]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.mylogger/2.5.0.202001050757: missing requirement [org.openhab.binding.mylogger/2.5.0.202001050757] osgi.wiring.package; filter:="(osgi.wiring.package=org.openprovenance.prov.interop)"]]
I checked the prov.interop in my .m2 local repo, and found that the manifest file does not export any content. I think this is the reason why the error happened. Can anyone help me solve this?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flucmoreau%2FProvToolbox%2Fissues%2F163%3Femail_source%3Dnotifications%26email_token%3DAABCXQZ3OAYDVATOBFRPOKLQ4GKWNA5CNFSM4KC2DULKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IEB7DGA&data=01%7C01%7Cluc.moreau%40kcl.ac.uk%7C7928d39b137046877d9808d791b9147a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=DrFiPoJldjpyiLl0ZR4w1KYne2emuyTjH78AGhAr%2FVQ%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAABCXQ3WJQTZHVWPONKCIDTQ4GKWNANCNFSM4KC2DULA&data=01%7C01%7Cluc.moreau%40kcl.ac.uk%7C7928d39b137046877d9808d791b9147a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=6ww3ds1E4p56O5MGdLJHPqJ0YD3KKABtwQQg1RU8Vh8%3D&reserved=0.
Thanks Professor and I have tried. Actually, it seems that this is not a good idea, because every prov package also has many jar dependencies. So it is hard to transform it into a bundle.
One could also take the jar-files published to mvnrepository
and wrap them inside one or more OSGi-bundles (see, e.g. Hall, Pauls, McCulloch, Savage. OSGi in Action. Manning Publications Co. Section 6.1, Turning Jars into Bundles). We are currently doing this to add provenance recording to an Eclipse-based application.
If people are interested in a wider release of such bundles, there would need to be some additional design decisions. Prime among them would be to decide whether to
- Package all jars into a single bundle,
- package each jar available at https://mvnrepository.com/artifact/org.openprovenance.prov into an individual bundle, or
- only package some of the above jars into bundles. I would, e.g., assume that wrapping the tutorials into a bundle could be somewhat pointless
Further, for each bundle one would have to decide on a bundle-name. If all jars were packaged into the same bundle, org.openprovenance.org
would seem quite reasonable. This might become more complicated if the jars were wrapped into individual bundles.
Any thoughts on this?