Skip to content

Commit

Permalink
Migrate to Cassandra driver at org.apache.cassandra.
Browse files Browse the repository at this point in the history
Closes #1467
  • Loading branch information
mp911de committed Jan 11, 2024
1 parent 9b930ed commit 45cb35b
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -90,7 +90,7 @@
<build.cassandra.ssl_storage_port>17001</build.cassandra.ssl_storage_port>
<build.cassandra.storage_port>17000</build.cassandra.storage_port>
<cassandra.version>3.11.12</cassandra.version>
<cassandra-driver.version>4.17.0</cassandra-driver.version>
<cassandra-driver.version>4.18.0</cassandra-driver.version>
<dist.id>spring-data-cassandra</dist.id>
<el.version>1.0</el.version>
<!-- NOTE: com.carrotsearch:hppc dependency version set to same version as Apache Cassandra 3.11.5 -->
Expand All @@ -105,7 +105,7 @@

<!-- Cassandra Driver -->
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-bom</artifactId>
<version>${cassandra-driver.version}</version>
<scope>import</scope>
Expand Down
11 changes: 9 additions & 2 deletions spring-data-cassandra/pom.xml
Expand Up @@ -62,12 +62,12 @@

<!-- Cassandra driver -->
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>

<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-query-builder</artifactId>
</dependency>

Expand Down Expand Up @@ -128,6 +128,13 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<optional>true</optional>
</dependency>

<!-- CDI -->

<dependency>
Expand Down
Expand Up @@ -32,6 +32,7 @@
import org.springframework.data.convert.CustomConversions;
import org.springframework.data.mapping.MappingException;
import org.springframework.data.mapping.context.MappingContext;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;

Expand Down Expand Up @@ -378,7 +379,7 @@ public UdtValue newValue() {
}

@Override
public UdtValue newValue(@edu.umd.cs.findbugs.annotations.NonNull Object... fields) {
public UdtValue newValue(@NonNull Object... fields) {
throw new UnsupportedOperationException(
"This implementation should only be used internally, this is likely a driver bug");
}
Expand All @@ -396,7 +397,7 @@ public boolean isDetached() {
}

@Override
public void attach(@edu.umd.cs.findbugs.annotations.NonNull AttachmentPoint attachmentPoint) {
public void attach(@NonNull AttachmentPoint attachmentPoint) {
throw new UnsupportedOperationException(
"This implementation should only be used internally, this is likely a driver bug");
}
Expand Down
1 change: 1 addition & 0 deletions src/main/antora/modules/ROOT/nav.adoc
Expand Up @@ -4,6 +4,7 @@
*** xref:migration-guide/migration-guide-1.5-to-2.0.adoc[]
*** xref:migration-guide/migration-guide-2.2-to-3.0.adoc[]
*** xref:migration-guide/migration-guide-3.0-to-4.0.adoc[]
*** xref:migration-guide/migration-guide-4.0-to-4.3.adoc[]
* xref:cassandra.adoc[]
** xref:cassandra/getting-started.adoc[]
Expand Down
@@ -0,0 +1,43 @@
[[cassandra.migration.4.x-to-4.3]]
= Migration Guide from 4.x to 4.3

Spring Data for Apache Cassandra 4.3 has migrated the `com.datastax.oss` groupId to `org.apache.cassandra`.

[[driver-group-id]]
== Migration of the Datastax driver into Apache

With the migration of the Datastax driver into the Apache foundation, you need to update coordinates of the driver in your code. Consider the following example showing a potential previous state of a Maven project configuration:

.`pom.xml` Example up to 4.2.x
====
[source,xml]
----
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-query-builder</artifactId>
</dependency>
----
====

With upgrading the groupId from `com.datastax.oss` to `org.apache.cassandra` your project configuration would look like:

.`pom.xml` Example since to 4.3.x
====
[source,xml]
----
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-query-builder</artifactId>
</dependency>
----
====

0 comments on commit 45cb35b

Please sign in to comment.