From 25c7ebcf391e9ac21d0c565ec5a75b3888144e4c Mon Sep 17 00:00:00 2001 From: md678685 <1917406+md678685@users.noreply.github.com> Date: Fri, 5 Jun 2020 15:22:40 +0100 Subject: [PATCH] Remove BuildTools script and update README --- .github/workflows/build.yml | 3 -- .gitignore | 3 +- README.md | 17 +++-------- scripts/buildtools.sh | 61 ------------------------------------- 4 files changed, 7 insertions(+), 77 deletions(-) delete mode 100755 scripts/buildtools.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b832765e..3d4b31e2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,9 +28,6 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 - - name: Run BuildTools - if: steps.cache.outputs.cache-hit != 'true' - run: chmod +x scripts/buildtools.sh && ./scripts/buildtools.sh - name: Build with Maven run: mvn package --file pom.xml - name: Copy artifacts diff --git a/.gitignore b/.gitignore index 5cb07e59b..d5ab3034d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ # Build files target/ -jars/ \ No newline at end of file +jars/ +out/ \ No newline at end of file diff --git a/README.md b/README.md index 8adad139c..a296bbd0c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![EssentialsX](https://i.imgur.com/CP4SZpB.png)](https://essentialsx.github.io) +[![EssentialsX](https://i.imgur.com/CP4SZpB.png)](https://essentialsx.cf) [Jenkins](http://ci.ender.zone/job/EssentialsX/) @@ -40,16 +40,8 @@ If you need to report a bug or want to suggest a new feature, you can [open an i Building -------- -EssentialsX builds against the Spigot/CraftBukkit server software for legacy support. - -To compile EssentialsX, you first need to run [BuildTools](https://www.spigotmc.org/wiki/buildtools). -This only needs to be done once. There are two ways to do this: - -* Use the provided script at `scripts/buildtools.sh` to automatically download and run BuildTools if needed. -* Download and run BuildTools yourself for versions `1.8` and `1.8.3`. - -Next, to build EssentialsX with Maven, run the following command: -``` +To build EssentialsX, you need JDK 8 or higher and Maven installed on your system. Then, run the following command: +```sh mvn clean install ``` @@ -58,7 +50,8 @@ Each module's jar can be found in `target/` inside each module's directory. Using EssentialsX in your plugin -------------------------------- -Writing a plugin and want to support EssentialsX? We have a Maven repository at https://ci.ender.zone/plugin/repository/everything/, and the EssentialsX artifact is `net.ess3:EssentialsX:2.17.0`. More information at the [wiki](https://github.com/EssentialsX/Essentials/wiki/Common-Issues#how-do-i-add-essentialsx-as-a-dependency). +Do you want to integrate with EssentialsX in your plugin? EssentialsX is available on the **ender.zone Maven repository** at https://ci.ender.zone/plugin/repository/everything/, and the EssentialsX artifact is `net.ess3:EssentialsX:2.17.2`. +More information at the [wiki](https://github.com/EssentialsX/Essentials/wiki/Common-Issues#how-do-i-add-essentialsx-as-a-dependency). Contributing diff --git a/scripts/buildtools.sh b/scripts/buildtools.sh deleted file mode 100755 index a7e454363..000000000 --- a/scripts/buildtools.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -mkdir -p .buildtools -pushd .buildtools - -is_installed() { - mvn dependency:get -q -Dartifact=$1 -DremoteRepositories=file://$HOME/.m2/repository 1>/dev/null 2>&1 - return $? -} - -ensure_buildtools() { - if [ ! -f "BuildTools.jar" ]; then - echo "Downloading BuildTools..." - if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "msys"* ]]; then - curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -o BuildTools.jar - else - wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar - fi - fi -} - -run_buildtools() { - ensure_buildtools - # Check if env var isnt empty, then run with xmx flag - if [ ! -z "$BUILDTOOLS_XMX" ]; then - echo "BUILDTOOLS_XMX Environment variable found. Running BuildTools with -Xmx$BUILDTOOLS_XMX" - java -Xmx$BUILDTOOLS_XMX -jar BuildTools.jar --rev $1 - else - java -jar BuildTools.jar --rev $1 - fi - if [ $? -ne 0 ]; then - echo "Running BuildTools for CB $1 failed! Aborting." - popd - exit 255 - else - echo "Successfully built version $1" - fi -} - -# Check CB 1.8 -is_installed org.bukkit:craftbukkit:1.8-R0.1-SNAPSHOT -is_18=$? # 0 = present, 1 = not present - -# Check CB 1.8.3 -is_installed org.bukkit:craftbukkit:1.8.3-R0.1-SNAPSHOT -is_183=$? - -if [ $is_18 -ne 0 ]; then - echo "Installing CraftBukkit 1.8..." - run_buildtools 1.8 -else - echo "CraftBukkit 1.8 installed; skipping BuildTools..." -fi - -if [ $is_183 -ne 0 ]; then - echo "Installing CraftBukkit 1.8.3..." - run_buildtools 1.8.3 -else - echo "CraftBukkit 1.8.3 installed; skipping BuildTools..." -fi - -popd