From a136f2b8ad5ffd4df2d5172df4baa2925e2355db Mon Sep 17 00:00:00 2001 From: Derek Chen-Becker Date: Fri, 16 Sep 2022 08:19:54 -0600 Subject: [PATCH 1/3] Add JaCoCo code coverage plugin This will generate code coverage report as part of the package/release targets so that we can identify areas needing improved testing. --- pom.xml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/pom.xml b/pom.xml index a7a8dbf..26bfbbb 100644 --- a/pom.xml +++ b/pom.xml @@ -177,6 +177,46 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + default-prepare-agent + + prepare-agent + + + + default-report + prepare-package + + report + + + + default-check + + check + + + + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.60 + + + + + + + + From 537837bf9e52c877d5336e9f3fc725bdf118838e Mon Sep 17 00:00:00 2001 From: Derek Chen-Becker Date: Fri, 16 Sep 2022 09:05:06 -0600 Subject: [PATCH 2/3] Add configuration to make shaded JAR Adds in the Maven Shade plugin in order to create a shaded (dependencies included) JAR for a given release. We update the configuration to use a different JAR and artifact ID in order to not conflict with the plugin-only JAR. --- .gitignore | 1 + pom.xml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.gitignore b/.gitignore index b83d222..c8ee1df 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target/ +/dependency-reduced-pom.xml diff --git a/pom.xml b/pom.xml index 26bfbbb..7483f96 100644 --- a/pom.xml +++ b/pom.xml @@ -217,6 +217,29 @@ + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + true + true + + + com.datastax.oss + + + + + package + + shade + + + + From 06024dab23c4a325573add0f046384a23936c073 Mon Sep 17 00:00:00 2001 From: Derek Chen-Becker Date: Fri, 16 Sep 2022 14:01:04 -0600 Subject: [PATCH 3/3] Update README with instructions for obtaining the shaded JAR The shaded JAR will be published to the GitHub releases page for easier access. We assume that people who want the shaded JAR are not already using Maven, so publishing the shaded JAR as an artifact would complicate things. --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b266882..73a821c 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,11 @@ Set the Region explicitly in your `advanced.auth-provider.class` configuration ( ## Add the Authentication Plugin to the Application -The authentication plugin supports version 4.x of the DataStax Java Driver for Cassandra. If you’re using Apache Maven, or a build system that can use Maven dependencies, add the following dependencies to your `pom.xml` file. +The authentication plugin supports version 4.x of the DataStax Java Driver for Cassandra. + +### With Maven/Ivy + +If you’re using Apache Maven, or a build system that can use Maven dependencies, add the following dependencies to your `pom.xml` file. ``` xml @@ -70,6 +74,12 @@ The authentication plugin supports version 4.x of the DataStax Java Driver for C ``` +### Download the Shaded JAR + +If you just need the JAR to use with a third party tool, please use the shaded JAR (includes the SDK and other +dependencies) located in the [releases](https://github.com/aws/aws-sigv4-auth-cassandra-java-driver-plugin/releases) +section on GitHub. + ## How to use the Authentication Plugin When using the open-source DataStax Java driver, the connection to your Amazon Keyspaces endpoint is represented by the `CqlSession` class. To create the `CqlSession`, you can either configure it programmatically using the `CqlSessionBuilder` class (accessed via `CqlSession.builder()`) or with the configuration file.