MobArena/build.xml

133 lines
4.9 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<project name="MobArena" default="dist" basedir=".">
<property name="pluginname" value="MobArena" />
2012-03-01 00:12:14 +01:00
<!-- Folders -->
<property name="src" location="src" />
<property name="bin" location="build" />
<property name="lib" location="lib" />
<property name="res" location="resources" />
<property name="server" location="D:\General\Java\Minecraft\Minecraft Server\plugins" />
<property name="ability-src" location="abilities" />
<property name="ability-dest" location="${res}/res/abilities" />
<!-- Dependency variables -->
<property name="cbver" value="1.1-R4" />
<property name="cbjar" value="craftbukkit-${cbver}.jar" />
<property name="cburl" value="http://repo.bukkit.org/content/repositories/releases/org/bukkit/craftbukkit/${cbver}/${cbjar}" />
<property name="vltver" value="1.2.10" />
<property name="vltjar" value="Vault-${vltver}-SNAPSHOT.jar" />
<property name="vlturl" value="http://ci.milkbowl.net/job/Vault/Recommended%20Build/artifact/target/${vltjar}" />
<property name="herojar" value="Heroes.jar" />
<property name="herourl" value="http://ci.milkbowl.net/job/Heroes/Heroic%20Build/artifact/build/${herojar}" />
<property name="sptjar" value="SpoutPluginAPI.jar" />
<property name="spturl" value="http://ci.spout.org/job/SpoutPluginAPI/Recommended/artifact/target/${sptjar}" />
<property name="msjar" value="MagicSpells.jar" />
<property name="msurl" value="http://dev.bukkit.org/media/files/575/866/${msjar}" />
<path id="classpath">
2012-03-01 00:12:14 +01:00
<fileset dir="${lib}" includes="*.jar" />
<pathelement location="${bin}" />
</path>
<target name="clean">
<delete dir="${bin}" />
</target>
2012-03-01 00:12:14 +01:00
<target name="prepare-bin">
<mkdir dir="${bin}" />
</target>
2012-03-01 00:12:14 +01:00
<target name="prepare-lib">
<mkdir dir="${lib}" />
</target>
<target name="prepare-abilities">
<mkdir dir="${ability-dest}" />
</target>
<!--<target name="copy-abilities">
2012-03-01 00:12:14 +01:00
<mkdir dir="${ability-dest}" />
<copy toDir="${ability-dest}">
<fileset dir="${ability-src}" />
</copy>
</target>-->
2012-03-01 00:12:14 +01:00
<target name="cleanup-abilities">
<delete dir="${ability-dest}" />
</target>
<!-- Builds the source code -->
2012-03-01 00:12:14 +01:00
<target name="build-src" depends="prepare-bin">
<javac target="1.6" source="1.6"
srcdir="${src}" destdir="${bin}"
debug="on" debuglevel="lines,vars,source"
2012-03-01 00:12:14 +01:00
includeantruntime="no">
<compilerarg value="-Xbootclasspath/p:${toString:classpath}"/>
</javac>
</target>
<!-- Builds the source code and shows deprecation issues -->
2012-03-01 00:12:14 +01:00
<target name="build-src-with-deprecation-check" depends="prepare-bin">
<javac target="1.6" source="1.6"
srcdir="${src}" destdir="${bin}"
debug="on" debuglevel="lines,vars,source"
2012-03-01 00:12:14 +01:00
includeantruntime="no">
<compilerarg value="-Xlint:deprecation"/>
2012-03-01 00:12:14 +01:00
<compilerarg value="-Xbootclasspath/p:${toString:classpath}"/>
</javac>
</target>
<!-- Builds the ability source code and places it in the resources folder -->
<target name="build-abilities" depends="prepare-abilities">
<javac target="1.6" source="1.6"
srcdir="${ability-src}" destdir="${ability-dest}"
debug="on" debuglevel="lines,vars,source"
includeantruntime="no">
<compilerarg value="-Xbootclasspath/p:${toString:classpath}"/>
</javac>
</target>
<!-- Build a .jar and copy to server's plugins-folder -->
<target name="dist" depends="build-src-with-deprecation-check, build-abilities">
<delete file="${pluginname}.jar" />
<jar jarfile="${pluginname}.jar">
<!-- Include the class-files (bin) and the resources (res) -->
<fileset dir="${bin}" />
<fileset dir="${res}" />
</jar>
2012-03-01 00:12:14 +01:00
<!-- Copy to server -->
<copy file="${pluginname}.jar" tofile="${server}/${pluginname}.jar" />
2012-03-01 00:12:14 +01:00
<delete dir="${ability-dest}" />
</target>
2012-03-01 00:12:14 +01:00
<!-- Download all dependency jars from the given URLs -->
<target name="download-dependencies" depends="prepare-lib">
<get src="${cburl}"
dest="${lib}/${cbjar}"
usetimestamp="true"
skipexisting="true" />
<get src="${vlturl}"
dest="${lib}/${vltjar}"
usetimestamp="true"
skipexisting="true" />
<get src="${herourl}"
dest="${lib}/${herojar}"
usetimestamp="true"
skipexisting="true" />
<get src="${spturl}"
dest="${lib}/${sptjar}"
usetimestamp="true"
skipexisting="true" />
<get src="${msurl}"
dest="${lib}/${msjar}"
usetimestamp="true"
skipexisting="true" />
</target>
</project>