mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 13:07:16 +01:00
133 lines
5.2 KiB
XML
133 lines
5.2 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:
|
|
|
|
- Craftbukkit
|
|
- Vault by Sleaker
|
|
- Heroes by the HeroCraft team
|
|
- SpoutPlugin by the Spout team
|
|
- MagicSpells by nisovin
|
|
|
|
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>
|
|
|
|
|
|
|
|
<!--
|
|
###########################################################################
|
|
### ###
|
|
### 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>
|
|
|
|
|
|
|
|
<!--
|
|
###########################################################################
|
|
### ###
|
|
### 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> |