aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-04-24 01:24:21 +0200
committerTeddy Wing2023-04-24 01:24:21 +0200
commit8c5a16e708c85cfbe0fd1d8b73defca761f54731 (patch)
treeb576991230745039018a85efd5d10a94889569b6
parentaebf437ae68eeb443af19847521c904821958b5d (diff)
downloadpdf-form-replace-font2-8c5a16e708c85cfbe0fd1d8b73defca761f54731.tar.bz2
pom.xml: Add 'maven-shade-plugin' to build an uber-jar
Package everything including our dependencies into a single JAR file. Thanks to these Stack Overflow answers for explaining that I needed to exclude the signature files from the final package: - https://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar/6743609#6743609 - https://stackoverflow.com/questions/34855649/invalid-signature-file-digest-for-manifest-main-attributes-exception-while-tryin/34856095#34856095
-rw-r--r--pom.xml34
1 files changed, 34 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 32bf23f..164523a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,6 +79,40 @@
</plugin>
</plugins>
</pluginManagement>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>3.4.1</version>
+
+ <configuration>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <mainClass>com.teddywing.pdf_form_replace_font2.App</mainClass>
+ </transformer>
+ </transformers>
+
+ <filters>
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.SF</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
+
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
<reporting>