WorldGuard/build.xml

113 lines
4.4 KiB
XML
Raw Normal View History

2010-12-26 06:56:05 +01:00
<project name="WorldGuard" default="dist" basedir=".">
<description>WorldGuard fixes bugs with Minecraft SMP and provides for
protection.</description>
<property name="src.dir" location="src"/>
<property name="build.dir" location="build"/>
<property name="dist.dir" location="dist"/>
<property name="release.dir" location="release"/>
<property name="lib.dir" location="lib"/>
2011-01-22 10:31:57 +01:00
<property name="docs.dir" location="docs"/>
<fileset id="libs" dir="${lib.dir}">
<include name="truezip.jar" />
<include name="Bukkit.jar" />
<include name="WorldEdit.jar" />
2011-02-25 01:48:42 +01:00
<include name="iConomy.jar" />
<include name="prtree.jar" />
2011-01-22 10:31:57 +01:00
</fileset>
2010-12-26 06:56:05 +01:00
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<!-- Compile the source files -->
<target name="compile" depends="init">
<javac srcdir="${src.dir}" deprecation="true" includeantruntime="true" destdir="${build.dir}" debug="true">
<classpath>
2011-01-22 10:31:57 +01:00
<fileset refid="libs"/>
2010-12-26 06:56:05 +01:00
</classpath>
</javac>
</target>
<!-- Build the .jar -->
<target name="jar" depends="compile">
<mkdir dir="${dist.dir}"/>
<manifest file="manifest.mf" mode="replace">
<attribute name="Implementation-Title" value="WorldGuard"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="WorldGuard-Version" value="${version}"/>
<attribute name="Class-Path" value="WorldEdit.jar WorldGuard/WorldEdit.jar"/>
2010-12-26 06:56:05 +01:00
</manifest>
<delete file="${build.dir}/plugin.yml"/>
2011-01-16 01:33:21 +01:00
<copy tofile="${build.dir}/plugin.yml" file="plugin.yml"/>
<replace file="${build.dir}/plugin.yml" token="WGVERSIONMACRO" value="${version}"/>
<mkdir dir="${build.dir}/defaults"/>
<copy tofile="${build.dir}/defaults/global.yml" file="global.yml"/>
<copy tofile="${build.dir}/defaults/config.yml" file="config.yml"/>
2011-03-28 08:49:30 +02:00
<copy tofile="${build.dir}/defaults/config_world.yml" file="config_world.yml"/>
<copy tofile="${build.dir}/defaults/blacklist.txt" file="blacklist.txt"/>
<jar jarfile="${dist.dir}/WorldGuard.jar" basedir="${build.dir}" manifest="manifest.mf">
<zipgroupfileset dir="lib" includes="prtree.jar" />
</jar>
2010-12-26 06:56:05 +01:00
</target>
<!-- Create the .jar -->
<target name="dist">
<property name="version" value="nightly"/>
<antcall target="jar"/>
</target>
<!-- Build a release -->
<target name="release" depends="clean">
2010-12-26 06:56:05 +01:00
<input message="Enter version:" addproperty="version"/>
<antcall target="jar"/>
<delete dir="${release.dir}"/>
<mkdir dir="${release.dir}"/>
2011-01-17 09:10:32 +01:00
<copy tofile="${release.dir}/README.txt" file="README.txt"/>
<copy tofile="${release.dir}/LICENSE.txt" file="LICENSE.txt"/>
<copy tofile="${release.dir}/CHANGELOG.txt" file="CHANGELOG.txt"/>
<copy tofile="${release.dir}/blacklist_table.sql" file="blacklist_table.sql"/>
2010-12-26 06:56:05 +01:00
<copy tofile="${release.dir}/WorldGuard.jar" file="${dist.dir}/WorldGuard.jar"/>
2011-01-16 01:33:21 +01:00
<zip destfile="${release.dir}/worldguard-${version}.zip" basedir="${release.dir}" excludes="*.zip plugin.yml"/>
2010-12-26 06:56:05 +01:00
<mkdir dir="${release.dir}/src"/>
<copy todir="${release.dir}/src">
<fileset dir="${src.dir}"/>
</copy>
2011-01-16 01:33:21 +01:00
<zip destfile="${release.dir}/worldguard-${version}-src.zip" basedir="${release.dir}" excludes="*.zip plugin.yml"/>
2010-12-26 06:56:05 +01:00
</target>
2011-01-22 10:31:57 +01:00
<!-- Javadoc -->
<target name="javadoc">
<javadoc access="public" author="true" destdir="${docs.dir}" doctitle="WorldGuard API" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.6" sourcepath="src" splitindex="true" use="true" version="true">
<classpath>
<fileset refid="libs"/>
</classpath>
</javadoc>
</target>
2010-12-26 06:56:05 +01:00
<!-- Clean the output -->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${release.dir}"/>
2011-01-22 10:31:57 +01:00
<delete dir="${docs.dir}"/>
2010-12-26 06:56:05 +01:00
</target>
<!--<target name="-get-version-git" if="git-revision">
<sequential>
<exec executable="git" failifexecutionfails="false" outputproperty="git-revision">
<arg value="rev-parse"/>
<arg value="HEAD"/>
</exec>
<exec executable="git" outputproperty="git-revision-dirty">
<arg value="diff"/>
<arg value="- -shortstat"/>
</exec>
<condition else="dev-${git-revision}-modified" property="version" value="dev-${git-revision}">
<equals arg1="" arg2="${git-revision-dirty}"/>
</condition>
</sequential>
</target>-->
</project>