I think this is an effect of the problem that people writing libraries
depend too much on other libraries.
One thing you should consider is if you really want to build upon a
library that needs so many further dependencies.
In some case you can not avoid it but you should limit these cases to
the lowest possible number.
Fortunately there are pre packaged bundles for many cases in the
servicemix bundles project.
For even larger cases like ActiveMQ, CXF, Camel, Hibernate, ... there
are features from Apache Karaf which also might help you.
If you are out of luck with both then it can become really difficult to
get your dependencies work in OSGi.
Simply packaging deps as bundles and putting them in the bundle dir does
not always work. So I would not rely on this.
In any case you should rather build your project on libraries that are
proven to work in OSGi and are pre packaged instead of trying to solve
all this yourself.
This can severely limit the available set of libraries but often this is
less of a problem than you might think at the start.
Christian
On 24.10.2014 16:02, PedroD wrote:
Greetings,
I’m using Felix Framework for my OSGi project, but I’ve came across a severe
problem concerning third party dependencies.
I’m using eclipse and maven-bundle-plugin to generate my bundles from the
sources and the MANIFEST.MF from the POM.XML file. So far so good. however when
I have some third party dependency in my bundle, I find myself looking for an
infinite list of JARs, which usually are not bundles, and putting them in my
/bundle Felix directory until no more dependencies are missing.
I call this process “Downloading the Internet for my OSGi application to work”.
What am I doing wrong? Sure I must be doing something very wrong, because I
can’t imagine anyone having a bundle A that depends on B, which then depends on
C and D, and then those two will depend on several others and so on…
What is the correct way to automate this? I would love to have one of the two
solutions:
1) Be able to create a massive JAR file with all of its dependencies embedded,
but exporting only the packages I want, and, of corse, not importing any
package.
2) (My preferred solution) Having a way to get all my dependencies into
individual JAR files that I can simply paste into the /bundle directory.
I have found tools that do me this, but they only do it for direct (1st degree)
dependencies, leaving transitive dependencies for me to solve manually.
This problem is critical. The lack of such a tool hampers the usage of OSGi.
I’ve searched and searched and searched, I’ve came across all the 101 solutions
such as PAX, bndtools, and friends, but they do not solve this issue…
Please help me.
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org