diff options
author | Teddy Wing | 2023-04-24 01:24:21 +0200 |
---|---|---|
committer | Teddy Wing | 2023-04-24 01:24:21 +0200 |
commit | 8c5a16e708c85cfbe0fd1d8b73defca761f54731 (patch) | |
tree | b576991230745039018a85efd5d10a94889569b6 | |
parent | aebf437ae68eeb443af19847521c904821958b5d (diff) | |
download | pdf-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.xml | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -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> |