mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 11:06:14 +01:00
145 lines
5.9 KiB
XML
145 lines
5.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
###########################################################################
|
|
### ###
|
|
### MobArena Build File ###
|
|
### ###
|
|
###########################################################################
|
|
|
|
To build MobArena, you need the following dependencies, which can all be
|
|
found on their respective websites/Bukkit pages/whatever:
|
|
|
|
- Bukkit by the Bukkit team http://dl.bukkit.org/downloads/bukkit/
|
|
- Vault by Sleaker http://dev.bukkit.org/bukkit-plugins/vault/
|
|
- MagicSpells by nisovin http://dev.bukkit.org/bukkit-plugins/magicspells/
|
|
|
|
The dependencies (jar-files) should be placed in a lib-folder at the root
|
|
of the project file structure, i.e. in the same folder as 'src'.
|
|
-->
|
|
<project name="MobArena" default="build-package-distribute" basedir=".">
|
|
|
|
<!--
|
|
###########################################################################
|
|
### ###
|
|
### Properties File ###
|
|
### ###
|
|
###########################################################################
|
|
|
|
The properties file (build.properties) is optional. It can contain the
|
|
following properties, which can provide compilation convenience:
|
|
|
|
- server.dir A path to a location that the MobArena.jar file will be
|
|
copied to, upon packaging. This is useful for paths to
|
|
a server's plugins-folder for easy testing.
|
|
-->
|
|
<property file="build.properties"/>
|
|
|
|
<!-- Folders -->
|
|
<property name="src" location="src"/>
|
|
<property name="bin" location="build"/>
|
|
<property name="lib" location="lib"/>
|
|
<property name="res" location="resources"/>
|
|
|
|
<!-- Classpath -->
|
|
<path id="classpath">
|
|
<fileset dir="${lib}" includes="*.jar"/>
|
|
<pathelement location="${bin}" />
|
|
</path>
|
|
|
|
|
|
|
|
<!--
|
|
###########################################################################
|
|
### ###
|
|
### Distribution targets ###
|
|
### ###
|
|
###########################################################################
|
|
-->
|
|
|
|
<!-- Copy MobArena.jar to the server.dir folder from the properties file -->
|
|
<target name="copy-to-server" if="server.dir">
|
|
<copy file="${ant.project.name}.jar" tofile="${server.dir}/${ant.project.name}.jar" />
|
|
</target>
|
|
|
|
<!-- Copy MobArena.jar to the dropbox.dir folder from the properties file -->
|
|
<target name="copy-to-dropbox" if="dropbox.dir">
|
|
<copy file="${ant.project.name}.jar" tofile="${dropbox.dir}/${ant.project.name}.jar" />
|
|
</target>
|
|
|
|
<!-- Copy MobArena.jar to the remote.dir folder from the properties file -->
|
|
<target name="copy-to-remote" if="remote.dir">
|
|
<scp file="${ant.project.name}.jar" todir="${remote.usr}:${remote.pwd}@${remote.host}:${remote.dir}" />
|
|
</target>
|
|
|
|
|
|
|
|
<!--
|
|
###########################################################################
|
|
### ###
|
|
### Build targets ###
|
|
### ###
|
|
###########################################################################
|
|
-->
|
|
|
|
<!-- Build the project files -->
|
|
<target name="build">
|
|
<antcall target="clean-bin"/>
|
|
<mkdir dir="${bin}"/>
|
|
<javac target="1.6" source="1.6"
|
|
srcdir="${src}" destdir="${bin}"
|
|
debug="on" debuglevel="lines,vars,source"
|
|
includeantruntime="no" classpathref="classpath">
|
|
<compilerarg value="-Xlint:deprecation"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<!-- Build and package the project -->
|
|
<target name="build-package">
|
|
<antcall target="build"/>
|
|
<delete file="${ant.project.name}.jar" />
|
|
<jar jarfile="${ant.project.name}.jar">
|
|
<!-- Include the class-files (bin) and the resources (res) -->
|
|
<fileset dir="${bin}" />
|
|
<fileset dir="${res}" />
|
|
</jar>
|
|
<antcall target="clean-bin"/>
|
|
</target>
|
|
|
|
<!-- Build, package and distribute the project -->
|
|
<target name="build-package-distribute">
|
|
<antcall target="build-package"/>
|
|
<antcall target="copy-to-server"/>
|
|
<antcall target="copy-to-dropbox"/>
|
|
</target>
|
|
|
|
<!-- Build, package and distribute the project (includes remote) -->
|
|
<target name="build-package-distribute-remote">
|
|
<antcall target="build-package"/>
|
|
<antcall target="copy-to-server"/>
|
|
<antcall target="copy-to-dropbox"/>
|
|
<antcall target="copy-to-remote"/>
|
|
</target>
|
|
|
|
|
|
|
|
<!--
|
|
###########################################################################
|
|
### ###
|
|
### Clean targets ###
|
|
### ###
|
|
###########################################################################
|
|
-->
|
|
|
|
<!-- Delete the bin folder -->
|
|
<target name="clean-bin">
|
|
<delete dir="${bin}"/>
|
|
</target>
|
|
|
|
<!-- Delete the bin folder and the jar-file -->
|
|
<target name="clean">
|
|
<antcall target="clean-bin"/>
|
|
<delete file="${ant.project.name}.jar"/>
|
|
</target>
|
|
</project>
|