-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
53 lines (42 loc) · 2.01 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<project name="Minecraft HuntersRace-Plugin" default="deploy" basedir=".">
<property name="minecraft.server.dir" value="D:/Privat/minecraft/server"/>
<property name="minecraft.server.run_command" value="D:/Privat/minecraft/server/startBukkit_Server.bat"/>
<property name="plugin.src.dir" value="${basedir}/src"/>
<property name="dist.home" value="${basedir}/dist"/>
<!-- as external-library: add the bukkit-server JAR/API to classpath -->
<path id="classpath">
<fileset dir="D:/Privat/minecraft/server">
<include name="craftbukkit-1.2.5-R5.0.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${dist.home}"/>
<delete dir="${basedir}/classes"/>
</target>
<target name="compile" depends="clean" description="Compiles classes.">
<mkdir dir="${basedir}/classes"/>
<mkdir dir="${basedir}/classes/res"/>
<javac srcdir="${plugin.src.dir}" destdir="${basedir}/classes" classpathref="classpath" debug="on" source="1.6" target="1.6" optimize="off" deprecation="off"/>
<copy todir="${basedir}/classes">
<fileset dir="${plugin.src.dir}/resources"><include name="*.yml"/></fileset>
</copy>
</target>
<target name="dist" description="Builds JAR file for a distribution." depends="compile">
<mkdir dir="${dist.home}"/>
<jar jarfile="${dist.home}/HuntersRace.jar" basedir="${basedir}/classes" includes="**"/>
</target>
<target name="deploy and run" description="Deploys the Plugin and starts bukkit-server" depends="dist">
<copy todir="${minecraft.server.dir}/plugins">
<fileset dir="${dist.home}"><include name="*.jar"/></fileset>
</copy>
<exec executable="cmd" spawn="true">
<arg value="/c"/>
<arg value="${minecraft.server.run_command}"/>
</exec>
</target>
<target name="deploy" description="Deploys the Plugin to the minecraft-server directory" depends="dist">
<copy todir="${minecraft.server.dir}/plugins">
<fileset dir="${dist.home}"><include name="*.jar"/></fileset>
</copy>
</target>
</project>