Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.61k stars 595 forks source link

Attempting to use unirest in osgi causes error #208

Closed bselack closed 5 years ago

bselack commented 7 years ago

I'm including unirest in a Liferay osgi activator, and white the dependencies seem to be fine, once the module is deployed, I get:

Unresolved requirement: Import-Package: org.apache.avalon.framework.logger

I've tried this with the stock unirest jar and building a unirest-java-1.4.10-SNAPSHOT-jar-with-dependencies.jar

Any insight?

bselack commented 7 years ago

Was able to fix this issue by adding

Import-Package: !org.apache.avalon.framework.*,\
  !org.apache.log.*,\
  *

As it appears these were optional dependencies, that were not marked as such in the library they were defined in.