Automated the fat jar creation process.
- Added a modified version of JarSplice in the tools/ directory, which can run using system properties as well as the GUI. The project is located here: https://github.com/itdelatrisu/JarSplicePlus - To create a fat jar, execute the Maven goal "install -Djar". The output file will be in the target/ directory and suffixed "-runnable". Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
4152af4977
commit
71f614c90a
|
@ -39,9 +39,11 @@ opsu! is distributed as a Maven project.
|
||||||
|
|
||||||
* To run the project, execute the Maven goal `compile exec:exec`.
|
* To run the project, execute the Maven goal `compile exec:exec`.
|
||||||
* To create a single executable JAR file, execute the Maven goal
|
* To create a single executable JAR file, execute the Maven goal
|
||||||
`package shade:shade`. Note that the LWJGL native libraries must be linked and
|
`install -Djar`. This will link the LWJGL native libraries using a
|
||||||
distributed with this application; [JarSplice](http://ninjacave.com/jarsplice)
|
[modified version](https://github.com/itdelatrisu/JarSplicePlus) of
|
||||||
is included in the tools directory to merge the files into a fat jar.
|
[JarSplice](http://ninjacave.com/jarsplice), which is included in the
|
||||||
|
`tools` directory in both its original and modified forms. The resulting
|
||||||
|
file will be located in `target/opsu-${version}-runnable.jar`.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
This software was created by Jeffrey Han
|
This software was created by Jeffrey Han
|
||||||
|
|
44
pom.xml
44
pom.xml
|
@ -10,12 +10,16 @@
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>res</directory>
|
<directory>res</directory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/Thumbs.db</exclude>
|
||||||
|
</excludes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.7</source>
|
<source>1.7</source>
|
||||||
<target>1.7</target>
|
<target>1.7</target>
|
||||||
|
@ -39,7 +43,16 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>run</id>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<skip>${jar}</skip>
|
||||||
<executable>java</executable>
|
<executable>java</executable>
|
||||||
<arguments>
|
<arguments>
|
||||||
<argument>-Djava.library.path="${project.build.directory}\natives"</argument>
|
<argument>-Djava.library.path="${project.build.directory}\natives"</argument>
|
||||||
|
@ -48,17 +61,48 @@
|
||||||
<argument>itdelatrisu.opsu.Opsu</argument>
|
<argument>itdelatrisu.opsu.Opsu</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>jarsplice</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>java</executable>
|
||||||
|
<workingDirectory>${basedir}/target</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>-jar</argument>
|
||||||
|
<argument>-Dinput="opsu-${project.version}.jar"</argument>
|
||||||
|
<argument>-Dmain="itdelatrisu.opsu.Opsu"</argument>
|
||||||
|
<argument>-Doutput="opsu-${project.version}-runnable.jar"</argument>
|
||||||
|
<argument>${basedir}/tools/JarSplicePlus.jar</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>2.3</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<!--
|
||||||
<artifactSet>
|
<artifactSet>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>*:*:natives*</exclude>
|
<exclude>*:*:natives*</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</artifactSet>
|
</artifactSet>
|
||||||
|
-->
|
||||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
BIN
tools/JarSplicePlus.jar
Normal file
BIN
tools/JarSplicePlus.jar
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user