mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-05-21 01:14:02 -05:00
Get .jar working as executable.
This commit is contained in:
@@ -49,46 +49,21 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- To create an executable fat JAR when using mvn package -->
|
||||
<plugin>
|
||||
<!-- Build an executable JAR -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>bootstrap.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<filters>
|
||||
<filter>
|
||||
<!--
|
||||
Exclude files that sign a jar
|
||||
(one or multiple of the dependencies).
|
||||
One may not repack a signed jar without
|
||||
this, or you will get a
|
||||
SecurityException at program start.
|
||||
-->
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/*.SF</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
<exclude>META-INF/*.INF</exclude> <!-- This one may not be required -->
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
<mainClass>com.cloudcraftgaming.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,3 +1,4 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path: com.cloudcraftgaming
|
||||
Main-Class: com.cloudcraftgaming.Main
|
||||
|
||||
Reference in New Issue
Block a user