Does anyone know where OBR (OSGI Bundle Repository) is defined in the OSGI official specs? I looked at Core, Compendium and Enterprise, and couldn't find it. :( Can someone point me to it?
Thanks!
You can find a draft here: http://www.osgi.org/download/rfc-0112_BundleRepository.pdf I don't know the details but this RFC has been going on for ages. I think the delay might have something to do with Eclipse P2 competing to be a better repository reference. Maybe someone else can clear that up?
Related
New to Golang...
I am tinkering with a project that has a dependency I will like to tweak.
So far so good I see that Go uses git directly for dependency management, but I am yet to come across a straight to the point guide on how to handle the case where you want to use a modified version of a dependency.
Googling seems to be a little confusing because I run across methods around dependency management which I believe is no longer recommended, but as a new comer, it is hard to tell which is which.
So would appreciate if someone can help clarify what is the recommended way to manage dependency as at 2020, and how would you go about using a modified dependency in your project.
Pointers to links that answers the following questions is also appreciated
usually i'm using glide, here you can change dependencies for any repo or even commit that you need, and it's easy to maintain.
I Need to user gradle-ospackage-plugin in maven project. Examples found googling are done with gradle.
Can someone help or point to a resource?
Thanks in advance.
Since i'm using maven, i finally switch to rpm-maven-plugin. To use it in windows environment however, you'll need to use cygwin and install rpm packages.
Hope this will help another guy in the future.
I would use a new version of JavaMail in XPages.
Reading various posts only solution seems to be to make a plugin OSGI.
Building a plugin I get a "Class not found" exception
Someone has managed to create the plugin or the classloader XPages kills this way?
For adding a third party jar into a plugin there are a few gotchas. John Dalsgaard has done a good blog on this http://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-file-into-a-plug-in/. The slides from my session at ICON UK on OSGi plugins are also available, for which I packaged up a third-party jar http://www.slideshare.net/paulswithers1/from-xpages-hero-to-osgi-guru-taking-the-scary-out-of-building-extension-libraries-icon-uk-2014
I while ago I had the same question. I created an OSGi plugin and wrapped the latest Javamail jar inside it. It did 'work' because I could use this classes in Designer, but I found out that whenever server code excecutes, it still uses the build-in javamail. Probably because it was loaded earlier and because of that not overridable.
Probably the ugliest solution you can think of, but replacing the 'mail.jar' in the directory [domino]\osgi\shared\eclipse\plugins\com.ibm.designer.lib.javamail_9.0.0.20130301-1431\lib\ did and still works.
If you ever find a better solution, I really hope you could share it ;-)
I'm working on a project, it's integration project, we are using Apache Camel and Apache Karaf.
In the project, I need to use the Jira REST Java client library.
So I've read quite a lot of various articles and threads about how to wrap non-OSGI library to OSGI bundle, but I'm really not sure if I got it right.
So, I've created a POM file with a dependency to the needed library. Made a package and tried to deploy it to Karaf, of course, Karaf complained for missing packages.
So, I've found corresponding maven dependency, added it, package goes into <Import-Package> and dependency into <Embed-Dependency>.
Another round, deploy, find dependency, add, ... and again, and again, until Karaf is fine with the bundle.
Is that really correct? It seems to me like quite crazy, so I guess I don't got it as usualy :)
Finally, the package get to stable that was on my work computer, I checked it quickly and went home, there I continued but, strange, the same POM / package, compiled on my personal computer is not working, again complaining about missing package, but this time, this package is for sure in the POMĀ file and for sure it is embeded in the package, I can see it there.
This missing package is this time org.apache.commons.codec.
org.osgi.framework.BundleException: Unresolved constraint in bundle jiraclient.bundle [134]: Unable to resolve 134.0: missing requirement [134.0] osgi.wiring.package; (osgi.wiring.package=org.apache.commons.codec)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1247)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1219)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1208)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:503)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[6:org.apache.felix.fileinstall:3.2.6]
So, now I'm totally confused, what is wrong :(
Pretty please, guys, help me. Thanks!
The POM file is long, so I guess link is better: http://pastebin.com/j5cmWveG
Yes OSGi is IMHO "far from easy to use" in terms of its deployment model, requiring 100% bundles with osgi metadata in MANIFEST.MF files. And you need a PhD in mathematics to understand the BND tool. And unfortunately many JARs are not OSGi bundles.
Looking at your pom.xml file with all the imports|exports, and that "not easy to understand" syntax, would just take 5-sec for any average engineer to understand that this "something is wrotten in the state of Denmark" ; eg OSGi != the world we live in. This must and should be easier IMHO.
You can install a plain JAR in Karaf using the wrap url handler:
http://karaf.apache.org/manual/latest/developers-guide/creating-bundles.html
Another trick is to create an uber JAR, eg to put it all in a single JAR file and then you can deploy that.
There is also FAB (Fuse Bundles) which makes OSGi deployment easier, as it handles much of this craziness for you at deploy time, instead of you having to deal with the OSGi MANIFEST.MF madness: http://www.davsclaus.com/2012/08/osgi-deployment-made-easy-with-fab.html
I have a similar goal as the person here: Using OSGi to implement auto-update
Essentially, I want to be able to update bundles in my applications automatically. The post above mentions that you can just call Bundle.Update(), but will that also download new dependencies if some have been added since the previous version? If so, where does it look for them?
Furthermore, what differentiates this solution with provisioning management tools, as discuses here: What's the difference between features in Karaf and OBR
That is, why would you use something like OBR vs. this Bundle.update() method.
No, bundle.update() only updates the individual bundle that you updated, it never does anything to any other bundles. Therefore it's certainly possible that, after the update, the bundle will no longer resolve due to missing dependencies. So this is exactly why you should use something higher-level like OBR or Karaf etc versus bundle.update().