From 9ffb712d43a3c5f042d48c784d1cd2d3b310c1ee Mon Sep 17 00:00:00 2001 From: Maxime Wiewiora <48218208+maximevw@users.noreply.github.com> Date: Sun, 19 Nov 2023 12:53:52 +0100 Subject: [PATCH] Some updates in readme and contributing guidelines --- CONTRIBUTING.md | 22 ++++++++++++++++++---- README.md | 16 ++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e099b4..32ed4b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,6 +52,12 @@ To run the tests, execute the following command: ``` mvn test ``` +Regarding the tests, you need **Docker** installed on your machine. +Indeed, most of the tests in this project are based on +[Testcontainers for Cassandra](https://java.testcontainers.org/modules/databases/cassandra/), because testing a JDBC API +implementation requires ensuring that the driver is able to connect to a database and execute queries correctly. +For example, very common JDBC drivers like those for [PostgreSQL](https://github.com/pgjdbc/pgjdbc) or +[MS SQL Server](https://github.com/Microsoft/mssql-jdbc/) are also tested against a real database. ### Submit a pull request @@ -63,12 +69,20 @@ Once your changes and tests are ready for review, submit them: to verify it or simply run `mvn clean install` and check the logs). 3. Rebase your changes: update your local repository with the most recent code from the original repository, and rebase -your branch on top of the latest `release/next` branch. It is better that your initial changes are squashed into a -single commit. If more changes are required to validate the pull request, we invite you to add them as separate commits. + your branch on top of the latest `release/next` branch. It is better that your initial changes are squashed into a + single commit. If more changes are required to validate the pull request, we invite you to add them as separate + commits. 4. Finally, push your local changes to your forked repository and submit a pull request into the branch `release/next` -with a title which sums up the changes that you have made (try to not exceed 50 characters), and provide more details in -the body. If necessary, also mention the number of the issue solved by your changes, e.g. "Closes #123". + with a title which sums up the changes that you have made (try to not exceed 50 characters), and provide more details + in the body. If necessary, also mention the number of the issue solved by your changes, e.g. "Closes #123". + +### About dependencies + +If your changes require to add a new dependency or update an existing one, be sure to check these points first of all: +* the dependency is the latest stable version of the library compatible with JDK 8 +* the dependency does not introduce vulnerabilities +* the version of the dependency is specified in a property `.version` in `pom.xml`. ### License headers diff --git a/README.md b/README.md index 69750e2..16ed2aa 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,11 @@ To compile and run tests, execute the following Maven command: mvn clean package ``` +To build a bundled version of the JDBC wrapper, run the following command: +```bash +mvn clean package -Pbundle +``` + #### Some considerations about running tests If for some reason the tests using DataStax Enterprise server (`*DseContainerTest`) fail in your local environment, you @@ -90,6 +95,17 @@ JetBrains DataGrip, you can have a look to the following links: this example uses Astra JDBC driver (based on this project), so refer to the "Usage" section below to adapt driver class and JDBC URL values. +This JDBC wrapper for Apache Cassandra® is also used to run +[Liquibase for Cassandra databases](https://github.com/liquibase/liquibase-cassandra) (from Liquibase 4.25.0). To execute Liquibase scripts on +your Cassandra database, specify the following properties in your Liquibase properties file: +``` +driver: com.ing.data.cassandra.jdbc.CassandraDriver +url: jdbc:cassandra://:/?compliancemode=Liquibase +``` +See the "Usage" section below for further details about the allowed parameters in the JDBC URL. +For further details about Liquibase usage, please check the +[official documentation](https://contribute.liquibase.com/extensions-integrations/directory/database-tutorials/cassandra/). + ## Usage Connect to a Cassandra cluster using the following arguments: