-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.xml
More file actions
39 lines (34 loc) · 1.38 KB
/
Copy pathbuild.xml
File metadata and controls
39 lines (34 loc) · 1.38 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="FastFood" default="dist" basedir=".">
<property file="build.properties"/>
<property name="src" location="src"/>
<property name="bin" location="build"/>
<property name="lib" location="lib"/>
<property name="res" location="resources"/>
<path id="classpath">
<fileset dir="${lib}" includes="**/*.jar"/>
<fileset dir="${res}" includes="**/*.*"/>
</path>
<target name="init">
<mkdir dir="${bin}"/>
</target>
<target name="copy-to-server" if="server.dir">
<copy file="${ant.project.name}.jar" tofile="${server.dir}/${ant.project.name}.jar" />
</target>
<!-- Compile the source and put in the bin-folder -->
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${bin}" includeantruntime="false" classpathref="classpath"/>
</target>
<!-- Build a .jar and copy to server's plugins-folder -->
<target name="dist" depends="compile">
<delete file="${ant.project.name}.jar"/>
<jar jarfile="${ant.project.name}.jar">
<!-- Include the class-files (bin) and the resources (res) -->
<fileset dir="${bin}"/>
<fileset dir="${res}"/>
</jar>
<!-- Copy to server and clean up -->
<antcall target="copy-to-server"/>
<delete dir="${bin}"/>
</target>
</project>