Elffuss BraidHub

kikocis/java-driver public

2f8dc102409e · 1.6 KiBRenderedRawPermalink
1## Using the shaded JAR
2
3The default driver JAR depends on [Netty](http://netty.io/), which is
4used internally for networking.
5
6This explicit dependency can be a problem if your application already
7uses another Netty version. To avoid conflicts, we provide a "shaded"
8version of the JAR, which bundles the Netty classes under a different
9package name:
10
11 <dependency>
12 <groupId>${project.groupId}</groupId>
13 <artifactId>cassandra-driver-core</artifactId>
14 <version>2.1.5</version>
15 <classifier>shaded</classifier>
16 <!-- Because the shaded JAR uses the original POM, you still need
17 to exclude this dependency explicitly: -->
18 <exclusions>
19 <exclusion>
20 <groupId>io.netty</groupId>
21 <artifactId>*</artifactId>
22 </exclusion>
23 </exclusions>
24 </dependency>
25
26If you also use the mapper, you need to remove its dependency to the
27non-shaded JAR:
28
29 <dependency>
30 <groupId>com.datastax.cassandra</groupId>
31 <artifactId>cassandra-driver-core</artifactId>
32 <version>2.1.5</version>
33 <classifier>shaded</classifier>
34 <exclusions>
35 <exclusion>
36 <groupId>io.netty</groupId>
37 <artifactId>*</artifactId>
38 </exclusion>
39 </exclusions>
40 </dependency>
41 <dependency>
42 <groupId>com.datastax.cassandra</groupId>
43 <artifactId>cassandra-driver-mapping</artifactId>
44 <version>2.1.5</version>
45 <exclusions>
46 <exclusion>
47 <groupId>com.datastax.cassandra</groupId>
48 <artifactId>cassandra-driver-core</artifactId>
49 </exclusion>
50 </exclusions>
51 </dependency>