Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
bin
ModDamage.jar
commons-io-2.4-src
test/
50 changes: 50 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<delete dir="bin"/>
</target>

<target name="clean.test">
<delete dir="test"/>
</target>

<target name="build" description="compile the source">
<mkdir dir="bin"/>
<javac srcdir="src" destdir="bin" includeantruntime="false" encoding="UTF-8">
Expand All @@ -22,4 +26,50 @@
<fileset dir="." includes="plugin.yml,web/**" />
</jar>
</target>

<target name="setup.test" depends="jar,clean.test">
<!-- Make all directories needed -->
<mkdir dir="test"/>
<mkdir dir="test/plugins"/>
<mkdir dir="test/disabled-plugins"/>
<!--
Copy all plugins to a seperate plugins folder.
This is so we can enable one at a time.
-->
<copy todir="test/disabled-plugins">
<fileset dir="resource">
<exclude name="minecraft*.jar"/>
<exclude name="*bukkit*.jar"/>
<exclude name="Automatonlexer.jar"/>
</fileset>
</copy>

<copy file="ModDamage.jar" tofile="test/plugins/ModDamage.jar"/>
<!-- Copy same version server we compiled againsted into the test environment-->
<copy todir="test">
<fileset dir="resource">
<include name="craftbukkit*.jar"/>
</fileset>
</copy>

<move tofile="test/craftbukkit.jar">
<fileset dir="test">
<include name="craftbukkit*.jar"/>
</fileset>
</move>
<echo append="false" file="test/startDebug.bat" level="debug">@ECHO OFF
<!-- -->ECHO starting server.
<!-- -->MODE con:cols=150 lines=5000
<!-- -->java -Xmx2G -Xms1G -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -jar craftbukkit.jar
</echo>
<echo append="false" file="test/start.bat" level="debug">@ECHO OFF
<!-- -->ECHO starting server.
<!-- -->MODE con:cols=150 lines=5000
<!-- -->java -Xmx2G -Xms1G -jar craftbukkit.jar
</echo>
<echo>The test server will have two batch files to run. One with a debugger set to port 8000 other with none. <!-- TODO: Setup a .sh file for bash and other operating systems! -->
<!-- -->Make sure to setup a remote debugger on eclipse (Or other IDE) to connect to this.
<!-- -->Server will not launch without it if you decide to run debugging file.
</echo>
</target>
</project>