A tool to "squash" the Hytale Server JAR file. It converts the original fat JAR (which contains all dependencies bundled inside) into a thin JAR that only contains the server code, along with a generated pom.xml file that lists all the external dependencies.
This allows for better dependency management and smaller distribution sizes for development.
- Deno (v1.40 or newer recommended)
- Clone this repository.
- Ensure Deno is installed and available in your system path.
You can run the tool using the defined Deno task:
deno task squash /path/to/HytaleServer.jarOr run the script directly:
deno run --allow-all squash.ts /path/to/HytaleServer.jar--debug: Preserves the temporary directories (debug_extractanddebug_build) in the output folder for inspection.
deno task squash /path/to/HytaleServer.jar --debug- Extraction: Unzips the provided Hytale Server JAR into a temporary directory.
- Analysis:
- Scans for all
pom.xmlfiles inside the JAR. - Identifies "internal" modules (starting with
com.hypixel). - Identifies "shaded" libraries (libraries already present in the JAR).
- Extracts a minimal set of external dependencies required by the server.
- Scans for all
- Repackaging:
- Copies the
com/hypixeldirectory (the actual server code) and necessary resources likemanifests.jsonandmigrationfolder. - Generates a valid Maven
pom.xmllisting the detected external dependencies. - Zips everything into a new file named
HytaleServer-squashed.jar.
- Copies the
The tool creates an out directory containing:
HytaleServer-squashed.jar: The thin server JAR.pom.xml: The Maven project file describing the server and its dependencies.