grgrzybek commented on issue #945: [ZOOKEEPER-3389] Zookeeper does not export all required packages in OSGi (needed for curator) URL: https://github.com/apache/zookeeper/pull/945#issuecomment-498168041 Excuse me for being late to the party. Let me introduce myself - I'm OSGi dinosaur and I'd be happy to help here. So `zookeeper-jute` jar contains (generated from `zookeeper-jute/src/main/resources/zookeeper.jute`) these packages: * org.apache.zookeeper.data * org.apache.zookeeper.proto * org.apache.zookeeper.server.quorum * org.apache.zookeeper.server.persistence * org.apache.zookeeper.txn `org.apache.zookeeper.data` is fine there, but `org.apache.zookeeper.server.quorum` and `org.apache.zookeeper.server.persistence` are duplicated in `zookeeper` jar, thus simple _OSGIfication_ of `zookeeper` + `zookeeper-jute` is not possible (can't have single package exported from two OSGi bundles. I mean it's possible, but may lead to unpredictable results - you can't tell which package your _importing_ bundle will _wire_ to). I understand that some classes of `org.apache.zookeeper.server.quorum` are written and some are generated from `zookeeper.jute` and it's fine in _flat classpath_ scenario. For OSGi, you'd have to do what for example Hibernate or httpclient (before silently dropping OSGi support in httpclient 5) is doing - there should be zookeeper-osgi.jar which just embeds both zookeeper and zookeeper-jute. This is best approach, because there'll be only one Maven artifact with `<packaging>bundle</packaging>`. I'll continue checking.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services