Vault/build.xml

68 lines
2.2 KiB
XML

<?xml version="1.0" ?>
<project default="main" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<property environment="env"/>
<path id="classpath">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<target name="main" depends="clean, compile, compress, javadoc" description="Main target">
<echo>Building the .jar file.</echo>
</target>
<target name="clean" description="Cleans project">
<echo>Cleaning</echo>
<delete failonerror="false">
<fileset dir="bin" includes="**/*" />
<fileset dir="javadoc" includes="**/*" />
</delete>
<delete file="Vault.jar" />
<mkdir dir="bin"/>
</target>
<target name="compile" description="Compilation target">
<echo>Compiling</echo>
<javac srcdir="." destdir="bin" debug="on" debuglevel="lines,vars,source" classpathref="classpath" includeantruntime="false" />
<copy file="plugin.yml" tofile="bin/plugin.yml" />
<replace file="bin/plugin.yml" token="b000" value="b${env.BUILD_NUMBER}" />
</target>
<target name="compress" description="Compression target">
<echo>Compressing</echo>
<jar jarfile="Vault.jar" basedir="bin" includes="net/**/*, plugin.yml, props/*">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
</jar>
<delete dir="bin" />
</target>
<target name="javadoc" description="Generate JavaDoc">
<javadoc packagenames="net.milkbowl.vault.economy,net.milkbowl.vault.permission,net.milkbowl.vault.chat"
sourcepath="src"
destdir="javadoc"
access="public"
windowtitle="Vault"
verbose="false"
author="true"
version="true">
<classpath>
<fileset dir="lib" includes="**/*.jar"/>
</classpath>
<bottom>
<![CDATA[<b>MilkBukkit, 2011</b>]]>
</bottom>
</javadoc>
</target>
<target name ="main_maven" depends="main" description="Main target + maven install">
<artifact:install file="Vault.jar" pomRefId="maven_pom"/>
</target>
<artifact:pom id="maven_pom" file="pom.xml"/>
<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />
</project>