XMage is a Maven multi-module Java project. Getting a local development environment running requires a JDK, Apache Maven, Git, and an IDE — after that, a single command builds every module from the rootDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/magefree/mage/llms.txt
Use this file to discover all available pages before exploring further.
pom.xml. This page walks through each step from cloning the repository to booting both the server and client on your own machine.
Prerequisites
Before cloning, make sure the following tools are available on yourPATH:
| Tool | Minimum version | Notes |
|---|---|---|
| JDK | 8 | The project’s source and target compatibility is 1.8; newer JDKs (11, 17, 21) compile it without issue — CI uses JDK 17 |
| Apache Maven | 3.6 | Manages all module builds and dependencies |
| Git | any recent | Used to clone and manage branches |
| IDE | — | IntelliJ IDEA is recommended; Eclipse also works |
The root
pom.xml sets <java.version>1.8</java.version> for both <source> and <target> in maven-compiler-plugin, so the compiled bytecode runs on Java 8 runtimes. You can freely compile with a newer JDK (the GitHub Actions CI workflow uses JDK 17 via actions/setup-java). If you see warnings about preview features or deprecated flags, they are harmless.Full Setup Walkthrough
If you plan to contribute, fork the repository first and clone your fork instead (see Workflow).
From the repository root, run a full Maven install. The
-DskipTests flag skips the JUnit test suite so the initial build finishes quickly:This compiles and installs every module declared in the root
pom.xml — Mage, Mage.Common, Mage.Server, Mage.Sets, Mage.Client, Mage.Plugins, Mage.Server.Plugins, Mage.Server.Console, Mage.Tests, Mage.Verify, and Mage.Reports — into your local Maven repository.Tests are run by
maven-surefire-plugin 3.1.2 with a tree-view reporter. Failed tests print a full stack trace; successful tests are silent by default.mage/).pom.xml and automatically imports all 11+ Maven modules. Each module (Mage, Mage.Server, Mage.Client, …) appears as a separate source root in the Maven side panel.mage.server.MainMage.Server$PROJECT_DIR$/Mage.Server-Dxmage.config.path=config/config.xmlThe server reads its configuration from
Mage.Server/config/config.xml relative to the working directory by default. To point to a different file, change the -Dxmage.config.path property accordingly.To enable test mode — which turns off password checks, enables cheat commands, skips deck validation, and prevents idle-disconnect during debugging — add the system property:
Test mode is automatically enabled for developer builds (builds that
version.isDeveloperBuild() returns true for). It provides fast-game buttons, cheat commands, simplified registration and login, and disables connection-validation pings so the IDE debugger does not cause client disconnects.mage.client.MageFrameMage.Client$PROJECT_DIR$/Mage.ClientLaunch the server run configuration first, wait for it to print
MAGE SERVER version: …, then start the client.localhost17171 (the default from config/config.xml)