mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-28 05:05:14 +01:00
Add bat helpers to tools
This commit is contained in:
parent
af9078c24b
commit
d5a1af0380
21
src/tools/bathelpers/README.md
Normal file
21
src/tools/bathelpers/README.md
Normal 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.
|
6
src/tools/bathelpers/analyze_project.bat
Normal file
6
src/tools/bathelpers/analyze_project.bat
Normal file
@ -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%"
|
6
src/tools/bathelpers/build_project.bat
Normal file
6
src/tools/bathelpers/build_project.bat
Normal file
@ -0,0 +1,6 @@
|
||||
: Build the project normally
|
||||
if "%jarfile%" == "" (
|
||||
call setvars.bat
|
||||
)
|
||||
|
||||
mvn clean install -f "%pomfile%"
|
2
src/tools/bathelpers/list_files.bat
Normal file
2
src/tools/bathelpers/list_files.bat
Normal file
@ -0,0 +1,2 @@
|
||||
: List all bat files in the directory
|
||||
dir /B *.bat
|
11
src/tools/bathelpers/move_plugin.bat
Normal file
11
src/tools/bathelpers/move_plugin.bat
Normal file
@ -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%'
|
||||
)
|
6
src/tools/bathelpers/quick_build.bat
Normal file
6
src/tools/bathelpers/quick_build.bat
Normal file
@ -0,0 +1,6 @@
|
||||
: Build quickly without cleaning or testing
|
||||
if "%jarfile%" == "" (
|
||||
call setvars.bat
|
||||
)
|
||||
|
||||
mvn install -f "%pomfile%" -Dmaven.test.skip
|
9
src/tools/bathelpers/run_server.bat
Normal file
9
src/tools/bathelpers/run_server.bat
Normal file
@ -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
|
14
src/tools/bathelpers/setvars.bat
Normal file
14
src/tools/bathelpers/setvars.bat
Normal file
@ -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.1-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
|
Loading…
Reference in New Issue
Block a user