build(io): split release into Console + GUI jars and slim the console jar
Replace the single HauntedManor.jar with two self-contained jars, one per entry point (HauntedManor-Console.jar -> App, HauntedManor-GUI.jar -> AppGui), each with its own Main-Class so both run via plain `java -jar`. The console jar omits the OGG decode libraries and the ~11 MB of music tracks (GameIO.setMusic is a no-op in text mode), dropping it from 17 MB to ~5 MB. README documents running each jar. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,25 +113,65 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<!-- Two self-contained jars in release/: one per entry point.
|
||||
createDependencyReducedPom is off globally so no stray pom is written. -->
|
||||
<configuration>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
</configuration>
|
||||
<executions>
|
||||
<!-- Console version -> release/HauntedManor-Console.jar -->
|
||||
<execution>
|
||||
<id>shade-console</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- Self-contained, runnable JAR with all dependencies bundled. -->
|
||||
<outputFile>${project.basedir}/release/HauntedManor.jar</outputFile>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<outputFile>${project.basedir}/release/HauntedManor-Console.jar</outputFile>
|
||||
<!-- Console has no audio (GameIO.setMusic is a no-op there), so leave
|
||||
out the OGG decode libraries and the ~11 MB of music tracks. -->
|
||||
<artifactSet>
|
||||
<excludes>
|
||||
<exclude>com.googlecode.soundlibs:vorbisspi</exclude>
|
||||
<exclude>com.googlecode.soundlibs:jorbis</exclude>
|
||||
</excludes>
|
||||
</artifactSet>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>thb.jeanluc:Semesterprojekt</artifact>
|
||||
<excludes>
|
||||
<exclude>music/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
<transformers>
|
||||
<!-- Default entry point: console version. GUI via -cp ... AppGui. -->
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<manifestEntries>
|
||||
<Main-Class>thb.jeanluc.adventure.App</Main-Class>
|
||||
</manifestEntries>
|
||||
</transformer>
|
||||
<!-- Merge META-INF/services so the OGG Vorbis SPI keeps working. -->
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!-- Swing GUI version -> release/HauntedManor-GUI.jar -->
|
||||
<execution>
|
||||
<id>shade-gui</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputFile>${project.basedir}/release/HauntedManor-GUI.jar</outputFile>
|
||||
<transformers>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<manifestEntries>
|
||||
<Main-Class>thb.jeanluc.adventure.AppGui</Main-Class>
|
||||
</manifestEntries>
|
||||
</transformer>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||
</transformers>
|
||||
|
||||
Reference in New Issue
Block a user