Move tools folder into test folder

- Classes still won't be present in JAR but classes will be automatically compiled by Maven inside of the test scope, facilitating the execution of tool tasks
This commit is contained in:
ljacqu
2016-05-03 20:24:34 +02:00
parent 23317caa46
commit 3645806edc
46 changed files with 69 additions and 64 deletions
+21
View File
@@ -0,0 +1,21 @@
## Bat Helpers
Collection of .bat files to quickly perform some frequent development tasks.
They allow you to quickly build the project and to move the generated JAR to
the plugins folder of your test server.
### Setup
1. Copy the files into a new, convenient directory
2. Open setvars.bat with a text editor and add the correct directories
3. Open `cmd` and navigate to your _bathelpers_ folder (`cd C:\path\the\folder`)
4. Type `list_files.bat` (Hint: Type `l` and hit Tab) to see the available tasks
### Example use case
1. After writing changes, `build_project` to build project
2. `move_plugin` moves the JAR file to the plugin folder
3. `run_server` to start the server with the fresh JAR
4. Problem detected, stop the server
5. Make a small change, use `quick_build` and `move_plugin` to update
6. Verify the change again on the server: `run_server`
All files start with a different letter, so you can conveniently type the
first letter and then complete with Tab.
@@ -0,0 +1,6 @@
: Analyze the project with Sonar (requires you install SonarQube)
if "%jarfile%" == "" (
call setvars.bat
)
mvn clean verify sonar:sonar -f "%pomfile%"
@@ -0,0 +1,6 @@
: Build the project normally
if "%jarfile%" == "" (
call setvars.bat
)
mvn clean install -f "%pomfile%" -B
@@ -0,0 +1,2 @@
: List all bat files in the directory
dir /B *.bat
@@ -0,0 +1,11 @@
: Moves the AuthMe JAR file to the plugins folder of the test server
: You will have to hit 'Y' to really replace it if it already exists
if "%jarfile%" == "" (
call setvars.bat
)
if exist %jarfile% (
xcopy %jarfile% %plugins%
) else (
echo Target file not found: '%jarfile%'
)
@@ -0,0 +1,6 @@
: Build quickly without cleaning or testing
if "%jarfile%" == "" (
call setvars.bat
)
mvn install -f "%pomfile%" -Dmaven.test.skip
@@ -0,0 +1,9 @@
: Start the Minecraft server
if "%jarfile%" == "" (
call setvars.bat
)
cd "%server%"
call java -Xmx1024M -Xms1024M -jar spigot_server.jar
cd "%batdir%"
dir /B *.bat
@@ -0,0 +1,14 @@
: The folder in which these .bat files are located
SET batdir=C:\your\path\AUTHME_DEV\bathelpers\
: The location of the generated JAR file
SET jarfile=C:\Users\yourname\IdeaProjects\AuthMeReloaded\target\AuthMe-5.2-SNAPSHOT.jar
: The location of the pom.xml file of the project
SET pomfile=C:\Users\yourname\IdeaProjects\AuthMeReloaded\pom.xml
: The folder in which the server is located
SET server=C:\your\path\AUTHME_DEV\spigot-server\
: The location of the plugins folder of the Minecraft server
SET plugins=%server%\plugins