Are these org.jboss.netty bundle dependencies necessary in MANIFEST.MF?

41 views
Skip to first unread message

Phil Xue

unread,
Jan 8, 2015, 5:18:45 AM1/8/15
to java-dri...@lists.datastax.com
Hi

I'm having a headache of satisfying some possibly unnecessary dependencies (org.jboss.netty) for com.datastax.drive.core bundle in an OSGi environment (Karaf). Looking inside driver core bundle, It appears to me these dependencies are already "shaded" within the bundle (e.g. in packages com.datastax.shaded.netty.*), so are these org.jboss.netty dependencies really necessary in Import-Package section of MANIFEST.MF? 

Below is the MANIFEST.MF of cassandra-drive-core-2.1.4.jar

Manifest-Version = 1.0
Bnd-LastModified = 1419329654604
Tool = Bnd-2.1.0.20130426-122213
Built-By = oliviermichallat
Build-Jdk = 1.7.0_60
Created-By = Apache Maven Bundle Plugin

Bundle-Name = DataStax Java Driver for Apache Cassandra - Core
Bundle-Description = A driver for Apache Cassandra 1.2+ that works exclusively with the Cassandra Query Language version 3 (CQL3) and Cassandra's binary protocol.
Bundle-SymbolicName = com.datastax.driver.core
Bundle-Version = 2.1.4
Bundle-ManifestVersion = 2

Import-Package = 
com.codahale.metrics;version="[3.0,4)",
com.google.common.base;version="[14.0,15)",
com.google.common.collect;version="[14.0,15)",
com.google.common.util.concurrent;version="[14.0,15)",
javax.net.ssl,
net.jpountz.lz4;resolution:=optional,
org.jboss.netty.bootstrap;version="[3.9,4)",
org.jboss.netty.buffer;version="[3.9,4)",
org.jboss.netty.channel;version="[3.9,4)",
org.jboss.netty.channel.group;version="[3.9,4)",
org.jboss.netty.channel.socket.nio;version="[3.9,4)",
org.jboss.netty.handler.codec.frame;version="[3.9,4)",
org.jboss.netty.handler.codec.oneone;version="[3.9,4)",
org.jboss.netty.handler.ssl;version="[3.9,4)",
org.jboss.netty.util;version="[3.9,4)",
org.slf4j;version="[1.7,2)",
org.xerial.snappy;resolution:=optional;version="[1.0,2)"
Export-Package = 
com.datastax.driver.core;
uses:="com.codahale.metrics,
com.datastax.driver.core.exceptions,
com.datastax.driver.core.policies,
com.google.common.util.concurrent,
javax.net.ssl,
org.jboss.netty.buffer,
org.jboss.netty.channel,
org.jboss.netty.handler.codec.frame,
org.jboss.netty.handler.codec.oneone,
org.jboss.netty.util";
version=2.1.4,
com.datastax.driver.core.exceptions;uses:=com.datastax.driver.core;version=2.1.4,
com.datastax.driver.core.policies;uses:=com.datastax.driver.core;version=2.1.4,
com.datastax.driver.core.querybuilder;uses:="com.datastax.driver.core,com.datastax.driver.core.policies";version=2.1.4,
com.datastax.driver.core.schemabuilder;uses:="com.datastax.driver.core,com.google.common.base";version=2.1.4,
com.datastax.driver.core.utils;version=2.1.4



If they are obsolete they can be removed by negating org.jboss.netty in maven bundle plugin

<Import-Package>!org.jboss.netty*,*</Import-Package>


Thanks

Phil

Olivier Michallat

unread,
Jan 27, 2015, 7:43:29 AM1/27/15
to java-dri...@lists.datastax.com
Hi,

Yes, we shade the Netty dependency since 2.1.4. The Maven bundle plugin doesn't seem to take that into account, you are right that we should exclude the original packages manually.

I've updated the description of JAVA-620 (a closely related issue) to remember to fix this in 2.1.5.

--

Olivier Michallat

Driver & tools engineer, DataStax


To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

Reply all
Reply to author
Forward
0 new messages