Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1681

ZooKeeper 3.4.x can optionally use netty for nio but the pom does not declare the dep as optional



    • Type: Improvement
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.4.0, 3.4.1, 3.4.2, 3.4.4, 3.4.5
    • Fix Version/s: 3.8.0
    • Component/s: None
    • Labels:


      For example in 3.4.5 we see:

      $ curl -sS http://search.maven.org/remotecontent?filepath=org/apache/zookeeper/zookeeper/3.4.5/zookeeper-3.4.5.pom | grep -B1 -A4 org.jboss.netty

      As a consumer I can depend on zookeeper with an exclude for org.jboss.netty#netty or I can let my transitive dep resolver pick a winner. This might be fine, except for those who might be using a more modern netty published under the newish io.netty groupId. With this twist you get both org.jboss.netty#netty;foo and io.netty#netty;bar on your classpath and runtime errors ensue from incompatibilities. unless you add an exclude against zookeeper (and clearly don't enable the zk netty nio handling.)

      I propose that this is a pom bug although this is debatable. Clearly as currently packaged zookeeper needs netty to compile, but I'd argue since it does not need netty to run, either the scope should be provided or optional or a zookeeper-netty lib should be broken out as an optional dependency and this new dep published by zookeeper can have a proper compile dependency on netty.


        1. ZOOKEEPER-1681.patch
          0.7 kB
          Stevo Slavić

          Issue Links



              • Assignee:
                sslavic Stevo Slavić
                jsirois John Sirois
              • Votes:
                3 Vote for this issue
                5 Start watching this issue


                • Created: