swap the fat jar to the shade plugin
This commit is contained in:
@@ -32,6 +32,18 @@
|
|||||||
<version>2.2.2</version>
|
<version>2.2.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.formdev</groupId>
|
||||||
|
<artifactId>flatlaf</artifactId>
|
||||||
|
<version>3.7.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.miglayout</groupId>
|
||||||
|
<artifactId>miglayout-swing</artifactId>
|
||||||
|
<version>11.4.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter</artifactId>
|
<artifactId>junit-jupiter</artifactId>
|
||||||
@@ -67,25 +79,44 @@
|
|||||||
<version>5.8.0.7211</version>
|
<version>5.8.0.7211</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<version>3.8.0</version>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<configuration>
|
<version>3.6.2</version>
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<mainClass>wtf.beatrice.autosqueal.Main</mainClass>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
<descriptorRefs>
|
|
||||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|
||||||
</descriptorRefs>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>make-assembly</id> <!-- this is used for inheritance merges -->
|
<id>make-fat-jar</id>
|
||||||
<phase>package</phase> <!-- bind to the packaging phase -->
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>shade</goal>
|
||||||
</goals>
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<!-- the fat jar replaces the main artifact: jpackage
|
||||||
|
and plain `java -jar` both use it. shade merges
|
||||||
|
the multi-release and service files correctly,
|
||||||
|
which the assembly plugin does not -->
|
||||||
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
|
<filters>
|
||||||
|
<filter>
|
||||||
|
<artifact>*:*</artifact>
|
||||||
|
<excludes>
|
||||||
|
<exclude>META-INF/*.SF</exclude>
|
||||||
|
<exclude>META-INF/*.DSA</exclude>
|
||||||
|
<exclude>META-INF/*.RSA</exclude>
|
||||||
|
<exclude>module-info.class</exclude>
|
||||||
|
<exclude>META-INF/versions/*/module-info.class</exclude>
|
||||||
|
</excludes>
|
||||||
|
</filter>
|
||||||
|
</filters>
|
||||||
|
<transformers>
|
||||||
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
|
<mainClass>wtf.beatrice.autosqueal.Main</mainClass>
|
||||||
|
<manifestEntries>
|
||||||
|
<Multi-Release>true</Multi-Release>
|
||||||
|
</manifestEntries>
|
||||||
|
</transformer>
|
||||||
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||||
|
</transformers>
|
||||||
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
@@ -135,7 +166,7 @@
|
|||||||
<resource>
|
<resource>
|
||||||
<directory>${project.build.directory}</directory>
|
<directory>${project.build.directory}</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>${project.build.finalName}-jar-with-dependencies.jar</include>
|
<include>${project.build.finalName}.jar</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -167,7 +198,7 @@
|
|||||||
<argument>--input</argument>
|
<argument>--input</argument>
|
||||||
<argument>${project.build.directory}/jpackage-input</argument>
|
<argument>${project.build.directory}/jpackage-input</argument>
|
||||||
<argument>--main-jar</argument>
|
<argument>--main-jar</argument>
|
||||||
<argument>${project.build.finalName}-jar-with-dependencies.jar</argument>
|
<argument>${project.build.finalName}.jar</argument>
|
||||||
<argument>--main-class</argument>
|
<argument>--main-class</argument>
|
||||||
<argument>wtf.beatrice.autosqueal.Main</argument>
|
<argument>wtf.beatrice.autosqueal.Main</argument>
|
||||||
<argument>--java-options</argument>
|
<argument>--java-options</argument>
|
||||||
|
|||||||
Reference in New Issue
Block a user