forked from Relliktsohg/CuboidPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·79 lines (76 loc) · 2.42 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="CuboidPlugin">
<property environment="env"/>
<property name="version" value="65dev"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.5"/>
<property name="source" value="1.5"/>
<property name="build_dir" value="build"/>
<property name="deploy_dir" value="/minecraft/server/bin/plugins/"/>
<property name="release_dir" value="../downloads/"/>
<property name="run_dir" value="run"/>
<path id="Minecraft-Server-Mod.classpath">
<pathelement location="bin"/>
<pathelement location="/minecraft/src/my_mods/Minecraft-Server-Mod/bin"/>
<pathelement location="run/minecraft_server.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<mkdir dir="run"/>
<mkdir dir="${build_dir}"/>
<mkdir dir="${release_dir}"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
<delete dir="build"/>
<delete dir="dist"/>
<delete includeEmptyDirs="true">
<fileset dir="run">
<exclude name="**/minecraft_server.jar"/>
</fileset>
</delete>
</target>
<target depends="clean" name="distclean">
<delete includeEmptyDirs="true">
<fileset dir="run">
</fileset>
<fileset dir="${release_dir}">
</fileset>
</delete>
</target>
<target depends="init, get_vanilla_minecraft_server.jar" name="build">
<javac debug="true" debuglevel="${debuglevel}" destdir="bin"
source="${source}" target="${target}" includeantruntime="false">
<src path="src"/>
<classpath refid="Minecraft-Server-Mod.classpath"/>
</javac>
</target>
<target depends="init" name="get_vanilla_minecraft_server.jar">
<get src="http://minecraft.net/download/minecraft_server.jar"
dest="run/minecraft_server.jar" usetimestamp="true"/>
</target>
<target depends="build" name="create_jar">
<jar destfile="${build_dir}/${ant.project.name}.jar">
<manifest>
<attribute name="Main-Class" value="Main"/>
</manifest>
<fileset dir="bin"/>
</jar>
</target>
<target depends="create_jar" name='deploy'>
<copy includeemptydirs="false" todir="${deploy_dir}">
<fileset dir="${build_dir}">
</fileset>
</copy>
<copy includeemptydirs="false" todir="${release_dir}">
<fileset dir="${build_dir}">
</fileset>
</copy>
</target>
</project>