Skip to content
This repository was archived by the owner on Feb 23, 2022. It is now read-only.

Commit 402c303

Browse files
alexanderkjallcodingllama
authored andcommitted
create a jar file that has all dependencies included (#3)
* create a jar file that has all dependencies included, so that it is suitable for redistribution * changed maven-assembly-plugin to maven-shade-plugin * add a <version> tag to build-helper-maven-plugin * added filter for proto files to the configuration of the maven-shade-plugin
1 parent fddbb75 commit 402c303

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
# Various common files to exclude.
44
*~
55

6+
# Files generated by IntelliJ
7+
.idea
8+
*.iml
9+
610
# More specific files/directories.
711
/target/

pom.xml

+46
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
<plugin>
172172
<groupId>org.codehaus.mojo</groupId>
173173
<artifactId>build-helper-maven-plugin</artifactId>
174+
<version>3.0.0</version>
174175
<executions>
175176
<execution>
176177
<phase>generate-sources</phase>
@@ -231,6 +232,51 @@
231232
</archive>
232233
</configuration>
233234
</plugin>
235+
236+
<plugin>
237+
<groupId>org.apache.maven.plugins</groupId>
238+
<artifactId>maven-shade-plugin</artifactId>
239+
<version>3.0.0</version>
240+
<executions>
241+
<execution>
242+
<phase>package</phase>
243+
<goals>
244+
<goal>shade</goal>
245+
</goals>
246+
<configuration>
247+
<filters>
248+
<filter>
249+
<artifact>*:*</artifact>
250+
<excludes>
251+
<exclude>META-INF/*.SF</exclude>
252+
<exclude>META-INF/*.DSA</exclude>
253+
<exclude>META-INF/*.RSA</exclude>
254+
</excludes>
255+
</filter>
256+
257+
<!-- Not explicitly referenced by the code, so
258+
it gets stripped by minimizeJar. -->
259+
<filter>
260+
<artifact>commons-logging:commons-logging</artifact>
261+
<includes>
262+
<include>org/apache/commons/logging/**</include>
263+
</includes>
264+
</filter>
265+
266+
<filter>
267+
<artifact>com.google.protobuf:protobuf-java</artifact>
268+
<excludes>
269+
<exclude>**/*.proto</exclude>
270+
</excludes>
271+
</filter>
272+
</filters>
273+
274+
<finalName>ctlog-${project.version}-with-deps</finalName>
275+
<minimizeJar>true</minimizeJar>
276+
</configuration>
277+
</execution>
278+
</executions>
279+
</plugin>
234280
</plugins>
235281
</build>
236282
</project>

0 commit comments

Comments
 (0)