aboutsummaryrefslogtreecommitdiffstats
path: root/document/pom.xml
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@oath.com>2018-10-17 10:57:25 +0200
committerBjørn Christian Seime <bjorncs@oath.com>2018-10-19 12:47:52 +0200
commitae8781986c93f2e3e1777ba6a9a0e829e282cfca (patch)
tree25a35272516b6c5bfe6d67206063c25eae649493 /document/pom.xml
parent63c5ed8f8f08c7411214ecbc417451a735aef676 (diff)
Use maven-shade-plugin to assemble fat jar
A bug in maven-assemble-plugin makes it very slow to assemble jar containing BouncyCastle
Diffstat (limited to 'document/pom.xml')
-rw-r--r--document/pom.xml30
1 files changed, 19 insertions, 11 deletions
diff --git a/document/pom.xml b/document/pom.xml
index 9357e87bb76..6881fd6349a 100644
--- a/document/pom.xml
+++ b/document/pom.xml
@@ -89,24 +89,32 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
<configuration>
- <archive>
- <manifest>
+ <finalName>${project.artifactId}-jar-with-dependencies</finalName>
+ <filters>
+ <filter>
+ <!-- Don't include signature files from bouncycastle in uber jar. -->
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.SF</exclude>
+ <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.RSA</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.yahoo.document.foo</mainClass>
- </manifest>
- </archive>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
+ </transformer>
+ </transformers>
</configuration>
<executions>
<execution>
- <id>make-assembly</id>
<phase>package</phase>
- <!-- append to the packaging phase. -->
<goals>
- <goal>single</goal>
+ <goal>shade</goal>
</goals>
</execution>
</executions>