Re: [OWLAPI-developer] difference between "owlapi-osgidistribution" and "owlapi-distribution" (Ignazio Palmisano)
[I've been making a lot of OSGI related chamhes for the next owlapi, so I will take this one]
OSGI is a very complicated way of doing simple things. Or it's a very simple way of doing complicated things. The important thing is, it's a way of doing things, so you need to do some things the OSGI way.
One of the most fundamental concepts in OSGI is the Bundle. A Bundle is a component of a software system. It can provide services and java packages to a system; conversely it can consume services and packages from other bundles loaded into the same system. Any package that is not exported from a bundle can only be accessed from within that bundle.
Each Bundle must be explicit about what it offers, and what it needs; however a Bundle is not responsible for saying how it's requirements are to be met.
Bundles are generally packaged as jar files, with special metadata in the manifest. This metadata is usually generated by the build system.
The build system can be configured to embedded every depend class inside the bundle that is being built ; however that is not generally the best way of putting together an OSGI system; it makes the jar file bigger, and may make it harder to use alternative packages.
The other approach is to install bundles providing those packages into the running system. If the dependency is already a bundle, you can just deploy that ; otherwise you can run a wrap command to create a minimalist bundle.
You can deploy these bundles by putting them in one of the directories protégé loads its bundles from e.g. the plugins directory.
There are more sophisticated ways of deploying bundles and their dependencies, but they require a few changes to the protégé launcher (these include url handlers that can deploy a bundle direct from maven central, and revolvers that can map from package requirements to bundle URLs.
On Feb 15, 2017 9:26 AM, "Manuel Enrique Puebla Martinez" <[hidden email]> wrote:
Dear Ignazio Palmisano:
You always very attentive to the questions in the forum, grateful.
However, I would like you to elaborate a little more on this comment:
"Ensure any new library you need is available as an OSGi bundle in protect's plugin folder."
I incorporate only 4 new dependencies maven to the file pom.xml of the package "protege-editor-owl", plus three classes programmed by me. I do nothing else, do I need to do anything else when I add new maven dependencies in an OSGI application?
"I have been reviewing the code and detected that the exception is thrown in the line" framework.start (); ", belonging to the method" start ", class" Launcher "."
The project compiles well when I do an "mvn clean package", the problem is when I run it.
I've been communicating with the Protégé project list for almost a week and I can not identify the problem, could you help me?
Here I leave the 4 dependencies that I incorporate: