Author Topic: [GUIDE] Maven support + running application in debug mode with Intellij IDEA  (Read 534 times)

Offline RosT

  • Crappy leecher
  • *
  • Posts: 1
Hello, guys.

Here I will describe you how to run server in debug mode in Intellij IDEA using maven-exec-pluign.

Here is the link to the folder with poms archive and patch:
(! patch is about 94mb)
There are two ways: copy poms.rar content to the root folder / apply patch from the link above.

 1. Create new project from aCis sources:

 2. Create 4 pom.xml files (essential for Maven, this is like build.xml for Ant tool)
   2.1 The first one is the root (parent) pom. It should be on the top of hierarchy

    with the following content: It's a shame that I cann't put text to [spoiler] here.
So you can skip this important step and unpack the content of poms.rar to the project root directory (it is also assembly.xml will be added to the datapack directory).

 3. Now all source files are located under src folder. We need to change it a little bit
   from this

   to this

 Repeat this step for aCis_gameserver modules as well.

4. Be sure you installed maven 3.3.9 version at least:

5. Execute mvn clean install:

By default it will create build folder inside aCis_gameserver/target folder with the gameserver and login server folders. Both of them contains libs,config folders and bash scripts as well. Also it unpacks data to the gameserver. It could require ~5 mins so if you want to build it faster go to aCis_datapack/assembly/assembly.xml and comment the followind line <include>data/**</include> (14th line).

6. To run the server in debug mode create several configurations for login server, game server and for register server:
You may notice @register-game-server this is the execution id that is defined inside gameserver's pom.xml for exec-maven-plugin. For the login and gameserver: @login-server, @game-server.

8. Select the configuration from the dropdown menu and click the green butoon:

Please notice in order to run the gameserver, you should at first copy hexid to the config folder and copy data folder to the aCis_gameserver folder or change though all the source files ".data/..' neither to "../aCis_datapach/data/.." or to the another directory which is containing data.

My next goal is to add spring, hibernate frameworks but this could never be happen due to the my primary work (
« Last Edit: September 18, 2016, 10:39:18 PM by RosT »