Skip to content

Commit 6b199e1

Browse files
authored
Merge pull request #28 from dchenbec/shaded-jar
Add shaded JAR configuration for Maven
2 parents 6f32f54 + 06024da commit 6b199e1

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target/
2+
/dependency-reduced-pom.xml

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ Set the Region explicitly in your `advanced.auth-provider.class` configuration (
6060

6161
## Add the Authentication Plugin to the Application
6262

63-
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.
63+
The authentication plugin supports version 4.x of the DataStax Java Driver for Cassandra.
64+
65+
### With Maven/Ivy
66+
67+
If you’re using Apache Maven, or a build system that can use Maven dependencies, add the following dependencies to your `pom.xml` file.
6468

6569
``` xml
6670
<dependency>
@@ -70,6 +74,12 @@ The authentication plugin supports version 4.x of the DataStax Java Driver for C
7074
</dependency>
7175
```
7276

77+
### Download the Shaded JAR
78+
79+
If you just need the JAR to use with a third party tool, please use the shaded JAR (includes the SDK and other
80+
dependencies) located in the [releases](https://github.com/aws/aws-sigv4-auth-cassandra-java-driver-plugin/releases)
81+
section on GitHub.
82+
7383
## How to use the Authentication Plugin
7484

7585
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.

pom.xml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,69 @@
177177
</execution>
178178
</executions>
179179
</plugin>
180+
<plugin>
181+
<groupId>org.jacoco</groupId>
182+
<artifactId>jacoco-maven-plugin</artifactId>
183+
<version>0.8.7</version>
184+
<executions>
185+
<execution>
186+
<id>default-prepare-agent</id>
187+
<goals>
188+
<goal>prepare-agent</goal>
189+
</goals>
190+
</execution>
191+
<execution>
192+
<id>default-report</id>
193+
<phase>prepare-package</phase>
194+
<goals>
195+
<goal>report</goal>
196+
</goals>
197+
</execution>
198+
<execution>
199+
<id>default-check</id>
200+
<goals>
201+
<goal>check</goal>
202+
</goals>
203+
<configuration>
204+
<rules>
205+
<rule>
206+
<element>BUNDLE</element>
207+
<limits>
208+
<limit>
209+
<counter>COMPLEXITY</counter>
210+
<value>COVEREDRATIO</value>
211+
<minimum>0.60</minimum>
212+
</limit>
213+
</limits>
214+
</rule>
215+
</rules>
216+
</configuration>
217+
</execution>
218+
</executions>
219+
</plugin>
220+
<plugin>
221+
<groupId>org.apache.maven.plugins</groupId>
222+
<artifactId>maven-shade-plugin</artifactId>
223+
<version>3.2.4</version>
224+
<configuration>
225+
<shadedArtifactAttached>true</shadedArtifactAttached>
226+
<useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>
227+
<artifactSet>
228+
<!-- Generally, consumers of the shaded JAR
229+
will already have the driver if they want
230+
the plugin -->
231+
<excludes>com.datastax.oss</excludes>
232+
</artifactSet>
233+
</configuration>
234+
<executions>
235+
<execution>
236+
<phase>package</phase>
237+
<goals>
238+
<goal>shade</goal>
239+
</goals>
240+
</execution>
241+
</executions>
242+
</plugin>
180243
</plugins>
181244
</build>
182245

0 commit comments

Comments
 (0)