2012-02-24 05:11:06 +01:00
|
|
|
<?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-02-24 05:11:06 +01:00
|
|
|
|
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 -->
|
2012-02-24 05:11:06 +01:00
|
|
|
<path id="classpath">
|
2013-06-25 00:37:43 +02:00
|
|
|
<fileset dir="${lib}" includes="*.jar"/>
|
2012-02-24 05:11:06 +01:00
|
|
|
<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" />
|
2012-02-24 05:11:06 +01:00
|
|
|
</target>
|
2013-06-25 00:37:43 +02:00
|
|
|
|
2013-08-07 01:57:48 +02:00
|
|
|
<!-- 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>
|
|
|
|
|
2013-06-25 00:37:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
###########################################################################
|
|
|
|
### ###
|
|
|
|
### Build targets ###
|
|
|
|
### ###
|
|
|
|
###########################################################################
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- Build the project files -->
|
|
|
|
<target name="build">
|
|
|
|
<antcall target="clean-bin"/>
|
|
|
|
<mkdir dir="${bin}"/>
|
2012-02-24 05:11:06 +01:00
|
|
|
<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">
|
2012-02-24 05:11:06 +01:00
|
|
|
<compilerarg value="-Xlint:deprecation"/>
|
2012-03-01 22:13:36 +01:00
|
|
|
</javac>
|
|
|
|
</target>
|
2012-02-24 05:11:06 +01:00
|
|
|
|
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">
|
2012-02-24 05:11:06 +01:00
|
|
|
<!-- 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"/>
|
2012-02-24 05:11:06 +01:00
|
|
|
</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>
|
|
|
|
|
2013-08-07 01:57:48 +02:00
|
|
|
<!-- 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>
|
|
|
|
|
2013-06-25 00:37:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
###########################################################################
|
|
|
|
### ###
|
|
|
|
### 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>
|
2012-02-24 05:11:06 +01:00
|
|
|
</project>
|