Yopy wrote:
So, here's the deal. I'm working with a CMS that works with Felix, which is
awesome and everything,

It is nice that everyone exalts Felix before complaining about it. ;-)

but when I'm trying to add an external dependency
through Maven (JSON-lib, to be precise), I'm getting an
org.osgi.framework.BundleException: Unresolved constraint in bundle 75:
package; (package=org.apache.log4j).

I've had this problem before and I could fix one error by manually setting a
dependency for the missing library in my project's pom.xml, but doesn't that
kinda defeat the purpose? I mean, the dependency for log4j should be / is in
the pom.xml file for the dependency, as a result it should automagically get
its own dependencies when the project that uses said dependency is built.

I assume this means you are using maven-bundle-plugin to create your bundle. The plugin does not automatically make assumptions about what is or is not included in the your bundle. All it does it take what you say is included and make sure the proper imports needed for that content is generated. If you need something else, then you need to tell it what it is you need.

I'm kinda sure this is a problem in Felix, but it might also be Maven
related itself. I've searched through Google for solutions for this problem,
but most posts I find about the subject are related to a specific program
that gets the problem.

* Is there any solution to my problem besides manually setting the
dependency in my project's pom?

It sounds like you need to modify your POM to deal with this issue.

* Is this a Felix problem or am I doing something wrong?

It doesn't sound like it has anything to do with the framework implementation.

* Is there any other solution?

Hard to say. From your description, I cannot really understand what it is that you are trying to do when you mention "adding an external dependency"...

Perhaps you need to post your POM file and/or give more details in general.

-> richard

I'd appreciate it if someone would be able to give me a solution to this
problem, it's kinda annoying.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to