Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 0853ed8

Browse files
committed
Expose dependency versions as properties so they may be overriden.
This is in support of enabling more convenient testing of the java-driver with different versions of libraries. For example, a lot of users will tend towards using a newer version of Guava rather than the provided 14.0.1 version. With this change we could run tests in the following manner: mvn test -Dguava.version=18.0
1 parent 90a9cd5 commit 0853ed8

3 files changed

Lines changed: 32 additions & 19 deletions

File tree

driver-core/pom.xml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,19 @@
3030
<dependency>
3131
<groupId>io.netty</groupId>
3232
<artifactId>netty</artifactId>
33-
<version>3.9.0.Final</version>
33+
<version>${netty.version}</version>
3434
</dependency>
3535

3636
<dependency>
3737
<groupId>com.google.guava</groupId>
3838
<artifactId>guava</artifactId>
39-
<!--
40-
We use an old version of Guava to be compatible with Spark 1.1.
41-
Check with the spark-cassandra-connector team before upgrading this.
42-
-->
43-
<version>14.0.1</version>
39+
<version>${guava.version}</version>
4440
</dependency>
4541

4642
<dependency>
4743
<groupId>com.codahale.metrics</groupId>
4844
<artifactId>metrics-core</artifactId>
49-
<version>3.0.2</version>
45+
<version>${metrics.version}</version>
5046
</dependency>
5147

5248
<!-- Compression libraries for the protocol. -->
@@ -55,14 +51,14 @@
5551
<dependency>
5652
<groupId>org.xerial.snappy</groupId>
5753
<artifactId>snappy-java</artifactId>
58-
<version>1.0.5</version>
54+
<version>${snappy.version}</version>
5955
<optional>true</optional>
6056
</dependency>
6157

6258
<dependency>
6359
<groupId>net.jpountz.lz4</groupId>
6460
<artifactId>lz4</artifactId>
65-
<version>1.2.0</version>
61+
<version>${lz4.version}</version>
6662
<optional>true</optional>
6763
</dependency>
6864

@@ -71,29 +67,29 @@
7167
<dependency>
7268
<groupId>org.testng</groupId>
7369
<artifactId>testng</artifactId>
74-
<version>6.8.8</version>
70+
<version>${testng.version}</version>
7571
<scope>test</scope>
7672
</dependency>
7773

7874
<dependency>
7975
<groupId>org.assertj</groupId>
8076
<artifactId>assertj-core</artifactId>
81-
<version>1.7.0</version>
77+
<version>${assertj.version}</version>
8278
<scope>test</scope>
8379
</dependency>
8480

8581
<dependency>
8682
<groupId>org.mockito</groupId>
8783
<artifactId>mockito-all</artifactId>
88-
<version>1.10.8</version>
84+
<version>${mockito.version}</version>
8985
<scope>test</scope>
9086
</dependency>
9187

9288
<dependency>
9389
<groupId>org.scassandra</groupId>
9490
<artifactId>java-client</artifactId>
9591
<!-- N.B. later versions of scassandra require JDK 7 -->
96-
<version>0.4.1</version>
92+
<version>${scassandra.version}</version>
9793
<scope>test</scope>
9894
<exclusions>
9995
<exclusion>

driver-examples/osgi/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@
8888
<dependency>
8989
<groupId>log4j</groupId>
9090
<artifactId>log4j</artifactId>
91-
<version>1.2.17</version>
91+
<version>${log4j.version}</version>
9292
<scope>test</scope>
9393
</dependency>
9494

9595
<dependency>
9696
<groupId>org.slf4j</groupId>
9797
<artifactId>slf4j-log4j12</artifactId>
98-
<version>1.7.6</version>
98+
<version>${slf4j-log4j12.version}</version>
9999
<scope>test</scope>
100100
</dependency>
101101

pom.xml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,37 @@
3838
<properties>
3939
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4040
<cassandra.version>2.0.10</cassandra.version>
41+
<java.version>1.6</java.version>
42+
<log4j.version>1.2.17</log4j.version>
43+
<slf4j-log4j12.version>1.7.6</slf4j-log4j12.version>
44+
<!--
45+
We use an old version of Guava to be compatible with Spark 1.1.
46+
Check with the spark-cassandra-connector team before upgrading this.
47+
-->
48+
<guava.version>14.0.1</guava.version>
49+
<netty.version>3.9.0.Final</netty.version>
50+
<metrics.version>3.0.2</metrics.version>
51+
<snappy.version>1.0.5</snappy.version>
52+
<lz4.version>1.2.0</lz4.version>
53+
<!-- test dependency versions -->
54+
<testng.version>6.8.8</testng.version>
55+
<assertj.version>1.7.0</assertj.version>
56+
<mockito.version>1.10.8</mockito.version>
57+
<scassandra.version>0.4.1</scassandra.version>
4158
</properties>
4259

4360
<dependencies>
4461
<dependency>
4562
<groupId>log4j</groupId>
4663
<artifactId>log4j</artifactId>
47-
<version>1.2.17</version>
64+
<version>${log4j.version}</version>
4865
<scope>test</scope>
4966
</dependency>
5067

5168
<dependency>
5269
<groupId>org.slf4j</groupId>
5370
<artifactId>slf4j-log4j12</artifactId>
54-
<version>1.7.6</version>
71+
<version>${slf4j-log4j12.version}</version>
5572
<scope>test</scope>
5673
</dependency>
5774
</dependencies>
@@ -74,8 +91,8 @@
7491
<artifactId>maven-compiler-plugin</artifactId>
7592
<version>3.1</version>
7693
<configuration>
77-
<source>1.6</source>
78-
<target>1.6</target>
94+
<source>${java.version}</source>
95+
<target>${java.version}</target>
7996
<optimize>true</optimize>
8097
<showDeprecation>true</showDeprecation>
8198
<showWarnings>true</showWarnings>

0 commit comments

Comments
 (0)