MobArena/build.xml

133 lines
5.2 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
2013-06-25 00:37:43 +02:00
<!--
###########################################################################
### ###
### 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"/>
2012-03-01 00:12:14 +01:00
<!-- Folders -->
2013-06-25 00:37:43 +02:00
<property name="src" location="src"/>
<property name="bin" location="build"/>
<property name="lib" location="lib"/>
<property name="res" location="resources"/>
<!-- Classpath -->
<path id="classpath">
2013-06-25 00:37:43 +02:00
<fileset dir="${lib}" includes="*.jar"/>
<pathelement location="${bin}" />
</path>
2013-06-25 00:37:43 +02:00
<!--
###########################################################################
### ###
### 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" />
2012-03-01 00:12:14 +01:00
</target>
2013-06-25 00:37:43 +02:00
<!-- 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>
2013-06-25 00:37:43 +02:00
<!--
###########################################################################
### ###
### Build targets ###
### ###
###########################################################################
-->
<!-- Build the project files -->
<target name="build">
<antcall target="clean-bin"/>
<mkdir dir="${bin}"/>
<javac target="1.6" source="1.6"
2013-06-25 00:37:43 +02:00
srcdir="${src}" destdir="${bin}"
debug="on" debuglevel="lines,vars,source"
includeantruntime="no" classpathref="classpath">
<compilerarg value="-Xlint:deprecation"/>
</javac>
</target>
2013-06-25 00:37:43 +02:00
<!-- 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>
2013-06-25 00:37:43 +02:00
<antcall target="clean-bin"/>
</target>
2013-06-25 00:37:43 +02:00
<!-- 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"/>
2012-03-01 00:12:14 +01:00
</target>
</project>