Skip to content

Commit 537837b

Browse files
committed
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.
1 parent a136f2b commit 537837b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
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

pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,29 @@
217217
</execution>
218218
</executions>
219219
</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>
220243
</plugins>
221244
</build>
222245

0 commit comments

Comments
 (0)