I'd like to contribute to xmage, but don't want to have to install netbeans to do so. There's already Maven build infrastructure, which suggests I could build from the command line. I've got as far as compiling the project. However, I can't figure out a way to run the project once I've done mvn install.
I've tried:
java -jar ./Mage.Server/target/mage-server.jar
but get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/remoting/transporter/TransporterServer
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.jboss.remoting.transporter.TransporterServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
If I include all the jar files in the project in the classpath:
java -jar ./Mage.Server/target/mage-server.jar -cp "`find . -name *.jar | tr '\n' ' '`"
I still get the same error.
Are there any instructions for building and running xmage from the command line, or is some additional work required to download additional dependencies (presumably ones which are available if you're working on the project in netbeans?) ?
Probably this should be done with mvn exec:exec but I guess it won't work without some additional research and changes. And this whole configuration can be a very tricky thing.
My advice: Do yourself a favor and use Netbeans.
For those of us that prefer to work in a terminal environment, instructions for building and running from the command line would be very useful. The driving reason is that I'd like to be able to run this program on a headless server without a gui.
I'm attempting to use netbeans just so I can get things running, but I'd much rather understand how this system works rather than let the build process by obfuscated by an IDE.
EDIT: I'm actually unable to get netbeans to work, it wont let me open the project; the option is just gray.
I was able to get a little farther (actually perhaps not farther, but something different) with the command line run. Like @townxelliot I was able to use mvn install to build the application. To run it I tried
mvn exec:java -Dexec.mainClass="mage.server.Main"
which errored, adding a -e flag I get the stack trace:
(py36) joncrall@Ooo:~/code/mage$ mvn exec:java -Dexec.mainClass="mage.server.Main" -e
...
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: linux
[INFO] os.detected.arch: x86_64
[INFO] os.detected.release: ubuntu
[INFO] os.detected.release.version: 16.04
[INFO] os.detected.release.like.ubuntu: true
[INFO] os.detected.release.like.debian: true
[INFO] os.detected.classifier: linux-x86_64
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mage Root 1.4.31
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ mage-root ---
[WARNING]
java.lang.ClassNotFoundException: mage.server.Main
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:270)
at java.lang.Thread.run(Thread.java:748)
disclaimer: I'm a C++/Python dev, and know little about Java or Maven.
EDIT2: I really did get farther this time. In fact I got it working!
By cding into Mage.Server and then running
mvn exec:java -Dexec.mainClass=mage.server.Main
It seemed to start the server
(py36) joncrall@Ooo:~/code/mage/Mage.Server$ mvn exec:java -Dexec.mainClass=mage.server.Main
[INFO] Scanning for projects...
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.1 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.1: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.1 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Mage Server 1.4.31
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.1 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.1: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.1 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ mage-server ---
INFO 2018-09-06 23:24:31,376 Starting MAGE server version 1.4.31V1 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:31,378 Logging level: DEBUG =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:31,622 Loading extension packages... =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:31,623 Done. =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:31,623 Loading cards... =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:38,931 DB: need to add 33 new cards =>[mage.server.Main.main()] CardScanner.scan
INFO 2018-09-06 23:24:38,955 Done. =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:38,955 Updating user stats DB... =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,052 Done. =>[mage.server.Main.main()] Main.main
DEBUG 2018-09-06 23:24:39,054 Loading game type: mage.game.TwoPlayerMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,055 Loading plugin: mage.game.TwoPlayerMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,057 Loading game type: mage.game.FreeForAllMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,057 Loading plugin: mage.game.FreeForAllMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,058 Loading game type: mage.game.CommanderDuelMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,058 Loading plugin: mage.game.CommanderDuelMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,059 Loading game type: mage.game.CommanderFreeForAllMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,060 Loading plugin: mage.game.CommanderFreeForAllMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,061 Loading game type: mage.game.TinyLeadersDuelMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,061 Loading plugin: mage.game.TinyLeadersDuelMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,062 Loading game type: mage.game.CanadianHighlanderDuelMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,063 Loading plugin: mage.game.CanadianHighlanderDuelMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,063 Loading game type: mage.game.PennyDreadfulCommanderFreeForAllMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,064 Loading plugin: mage.game.PennyDreadfulCommanderFreeForAllMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,065 Loading game type: mage.game.FreeformCommanderFreeForAllMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,066 Loading plugin: mage.game.FreeformCommanderFreeForAllMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,080 Loading game type: mage.game.BrawlDuelMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,081 Loading plugin: mage.game.BrawlDuelMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,081 Loading game type: mage.game.BrawlFreeForAllMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,082 Loading plugin: mage.game.BrawlFreeForAllMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,083 Loading game type: mage.game.MomirDuelMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,083 Loading plugin: mage.game.MomirDuelMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,083 Loading game type: mage.game.MomirFreeForAllMatch =>[mage.server.Main.main()] Main.loadGameType
DEBUG 2018-09-06 23:24:39,084 Loading plugin: mage.game.MomirFreeForAllMatch =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,085 Loading tournament type: mage.tournament.ConstructedEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,086 Loading plugin: mage.tournament.ConstructedEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,088 Loading tournament type: mage.tournament.ConstructedSwissTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,089 Loading plugin: mage.tournament.ConstructedSwissTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,089 Loading tournament type: mage.tournament.BoosterDraftEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,090 Loading plugin: mage.tournament.BoosterDraftEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,091 Loading tournament type: mage.tournament.BoosterDraftEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,091 Loading plugin: mage.tournament.BoosterDraftEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,091 Loading tournament type: mage.tournament.RandomBoosterDraftEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,092 Loading plugin: mage.tournament.RandomBoosterDraftEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,092 Loading tournament type: mage.tournament.RichManDraftEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,093 Loading plugin: mage.tournament.RichManDraftEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,093 Loading tournament type: mage.tournament.RichManCubeDraftEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,093 Loading plugin: mage.tournament.RichManCubeDraftEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,094 Loading tournament type: mage.tournament.BoosterDraftSwissTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,094 Loading plugin: mage.tournament.BoosterDraftSwissTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,095 Loading tournament type: mage.tournament.BoosterDraftSwissTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,095 Loading plugin: mage.tournament.BoosterDraftSwissTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,095 Loading tournament type: mage.tournament.RandomBoosterDraftSwissTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,096 Loading plugin: mage.tournament.RandomBoosterDraftSwissTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,096 Loading tournament type: mage.tournament.SealedEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,097 Loading plugin: mage.tournament.SealedEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,097 Loading tournament type: mage.tournament.SealedEliminationTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,097 Loading plugin: mage.tournament.SealedEliminationTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,098 Loading tournament type: mage.tournament.SealedSwissTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,098 Loading plugin: mage.tournament.SealedSwissTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,098 Loading tournament type: mage.tournament.SealedSwissTournament =>[mage.server.Main.main()] Main.loadTournamentType
DEBUG 2018-09-06 23:24:39,099 Loading plugin: mage.tournament.SealedSwissTournament =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,100 Loading plugin: mage.player.human.HumanPlayer =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,114 Loading plugin: mage.player.ai.ComputerPlayer7 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,123 Loading plugin: mage.player.ai.ComputerDraftPlayer =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,124 Loading plugin: mage.tournament.cubes.AdamStyborskisPauperCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,126 Loading plugin: mage.tournament.cubes.BensCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,129 Loading plugin: mage.tournament.cubes.CubeTutor360Pauper =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,131 Loading plugin: mage.tournament.cubes.CubeTutor720 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,134 Loading plugin: mage.tournament.cubes.EricKlugsProTourCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,136 Loading plugin: mage.tournament.cubes.GuillaumeMatignonsJennysJohnnysCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,138 Loading plugin: mage.tournament.cubes.JimDavisCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,140 Loading plugin: mage.tournament.cubes.JosephVasolisPeasantCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,142 Loading plugin: mage.tournament.cubes.MonoBlueCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,145 Loading plugin: mage.tournament.cubes.SamBlacksCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,148 Loading plugin: mage.tournament.cubes.TimotheeSimonotsTwistedColorPieCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,150 Loading plugin: mage.tournament.cubes.MTGOMarchCube2014 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,152 Loading plugin: mage.tournament.cubes.LegacyCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,155 Loading plugin: mage.tournament.cubes.LegacyCubeMarch2015 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,157 Loading plugin: mage.tournament.cubes.LegacyCubeSeptember2015 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,159 Loading plugin: mage.tournament.cubes.LegacyCubeJanuary2016 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,162 Loading plugin: mage.tournament.cubes.LegacyCubeSeptember2016 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,165 Loading plugin: mage.tournament.cubes.LegacyCubeJanuary2017 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,167 Loading plugin: mage.tournament.cubes.LegacyCubeApril2017 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,170 Loading plugin: mage.tournament.cubes.LegacyCube2018February =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,172 Loading plugin: mage.tournament.cubes.LegendaryCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,175 Loading plugin: mage.tournament.cubes.LegendaryCubeApril2016 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,178 Loading plugin: mage.tournament.cubes.ModernCube2017 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,180 Loading plugin: mage.tournament.cubes.VintageCube2013 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,182 Loading plugin: mage.tournament.cubes.VintageCube2014 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,184 Loading plugin: mage.tournament.cubes.VintageCube2015 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,186 Loading plugin: mage.tournament.cubes.VintageCube2016 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,188 Loading plugin: mage.tournament.cubes.VintageCubeJune2016 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,191 Loading plugin: mage.tournament.cubes.VintageCubeNovember2016 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,193 Loading plugin: mage.tournament.cubes.VintageCubeJune2017 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,195 Loading plugin: mage.tournament.cubes.VintageCubeDecember2017 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,198 Loading plugin: mage.tournament.cubes.VintageCubeJune2018 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,201 Loading plugin: mage.tournament.cubes.PeasantsToolboxCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,205 Loading plugin: mage.tournament.cubes.MTGCube =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,207 Loading plugin: mage.tournament.cubes.CubeFromDeck =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,208 Loading plugin: mage.deck.Standard =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,210 Loading plugin: mage.deck.Extended =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,210 Loading plugin: mage.deck.Frontier =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,210 Loading plugin: mage.deck.Modern =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,211 Loading plugin: mage.deck.ModernNoBannedList =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,211 Loading plugin: mage.deck.Eternal =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,212 Loading plugin: mage.deck.Legacy =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,213 Loading plugin: mage.deck.Vintage =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,213 Loading plugin: mage.deck.Pauper =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,214 Loading plugin: mage.deck.HistoricalType2 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,214 Loading plugin: mage.deck.SuperType2 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,215 Loading plugin: mage.deck.AusHighlander =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,216 Loading plugin: mage.deck.CanadianHighlander =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,216 Loading plugin: mage.deck.OldSchool9394 =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,217 Loading plugin: mage.deck.OldSchool9394Italian =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,217 Loading plugin: mage.deck.OldSchool9394CFB =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,218 Loading plugin: mage.deck.OldSchool9394EG =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,218 Loading plugin: mage.deck.OldSchool9394EC =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,219 Loading plugin: mage.deck.Freeform =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,219 Loading plugin: mage.deck.Commander =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,221 Loading plugin: mage.deck.DuelCommander =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,221 Loading plugin: mage.deck.MTGO1v1Commander =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,222 Loading plugin: mage.deck.TinyLeaders =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,223 Loading plugin: mage.deck.Momir =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,223 Loading plugin: mage.deck.PennyDreadfulCommander =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,224 Loading plugin: mage.deck.FreeformCommander =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,224 Loading plugin: mage.deck.Brawl =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,225 Loading plugin: mage.deck.AmonkhetBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,225 Loading plugin: mage.deck.BattleForZendikarBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,225 Loading plugin: mage.deck.InnistradBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,226 Loading plugin: mage.deck.IxalanBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,226 Loading plugin: mage.deck.KaladeshBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,226 Loading plugin: mage.deck.KamigawaBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,227 Loading plugin: mage.deck.KhansOfTarkirBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,227 Loading plugin: mage.deck.LorwynBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,227 Loading plugin: mage.deck.ReturnToRavnicaBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,227 Loading plugin: mage.deck.ScarsOfMirrodinBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,228 Loading plugin: mage.deck.ShadowmoorBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,228 Loading plugin: mage.deck.ShadowsOverInnistradBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,228 Loading plugin: mage.deck.ShardsOfAlaraBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,229 Loading plugin: mage.deck.TherosBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,229 Loading plugin: mage.deck.ZendikarBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,229 Loading plugin: mage.deck.StarWarsBlock =>[mage.server.Main.main()] Main.loadPlugin
DEBUG 2018-09-06 23:24:39,229 Loading plugin: mage.deck.Limited =>[mage.server.Main.main()] Main.loadPlugin
INFO 2018-09-06 23:24:39,230 Config - max seconds idle: 300 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,230 Config - max game threads: 10 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,230 Config - max AI opponents: 15 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,230 Config - min usr name le.: 3 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,230 Config - max usr name le.: 14 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,230 Config - min pswrd length: 8 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,231 Config - max pswrd length: 100 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,231 Config - inv.usr name pat: [^a-z0-9_] =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,231 Config - save game active: false =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,231 Config - backlog size : 200 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,231 Config - lease period : 5000 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,231 Config - sock wrt timeout: 10000 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,231 Config - max pool size : 300 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,232 Config - num accp.threads: 2 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,232 Config - second.bind port: 17179 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,232 Config - auth. activated : false =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,232 Config - mailgun api key : key-d93e81f19a9c9ed243ebb7cc9381385c =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,232 Config - mailgun domain : sandbox401a433f30d445309a5e86b6c53f7812.mailgun.org =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,232 Config - mail smtp Host : smtp.1und1.de =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,232 Config - mail smtpPort : 465 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,233 Config - mail user : [email protected] =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,233 Config - mail passw. len.: 8 =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,233 Config - mail from addre.: [email protected] =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,233 Config - google account : =>[mage.server.Main.main()] Main.main
INFO 2018-09-06 23:24:39,330 Started MAGE server - listening on 0.0.0.0:17171/?serializationtype=jboss&maxPoolSize=300 =>[mage.server.Main.main()] Main.main
I guess its all about running maven from the right directory? (... I still don't quite understand this build system)
So, I'll write a quick summary laying out instruction for getting the development environment running via command-line instructions. These instructions will target Ubuntu 16.04, but other distros can swap out the apt install for the relevant commands / downloads.
# Install Java Development Toolkit
sudo apt install default-jre
sudo apt install default-jdk
# Install Maven (a build automation tool for Java projects)
# Maven, uses the pom.xml files to download dependencies and build the project.
# Note that it will create a ~/.m2 directory
sudo apt install maven
# Set this to where you want your xmage sourcecode to live
CODE_DIR=$HOME/code
mkdir -p $CODE_DIR
cd $CODE_DIR
# Clone the repo
git clone https://github.com/magefree/mage.git
cd $CODE_DIR/mage
# Use maven to build the project (this might actually put something in your ~/.m2 directory, so there might be a better less invasive command to run for building here)
mvn install
# Start the Maven Server
cd $CODE_DIR/mage/Mage.Server
mvn exec:java -Dexec.mainClass=mage.server.Main
# In a separate terminal (or if you use something like nohup to start the
# server in the background), start the Mage Client. This command will start the
# GUI.
cd $CODE_DIR/mage/Mage.Client
mvn exec:java -Dexec.mainClass=mage.client.MageFrame
Most helpful comment
So, I'll write a quick summary laying out instruction for getting the development environment running via command-line instructions. These instructions will target Ubuntu 16.04, but other distros can swap out the
apt installfor the relevant commands / downloads.