-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
57 lines (51 loc) · 1.6 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="ElfVille" default="compile" basedir=".">
<description>ElfVille build script.</description>
<property name="src" location="src" />
<property name="build" location="bin" />
<property name="lib" location="lib" />
<target name="init" description="Initialize stuff">
<tstamp />
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" description="Compile the source">
<javac srcdir="${src}" destdir="${build}" includeantruntime="false">
<classpath>
<path id="junit" location="${lib}/junit.jar"/>
</classpath>
</javac>
</target>
<target name="jar" depends="compile" description="Make the JARs">
<mkdir dir="${build}/dist" />
<jar destfile="${build}/dist/server.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="elfville.server.Server" />
</manifest>
</jar>
<jar destfile="${build}/dist/client.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="elfville.client.Client" />
</manifest>
</jar>
</target>
<target name="clean" depends="clobber">
<delete dir="${build}" />
</target>
<target name="clobber">
<delete>
<fileset dir="resources" includes="*.db*"></fileset>
</delete>
</target>
<target name="test" depends="compile,clobber" description="Run test suite">
<junit fork="yes" haltonfailure="yes">
<test name="testcases.AllTests" />
<classpath>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<path location="${build}" />
</classpath>
<formatter type="plain" usefile="false" />
</junit>
</target>
</project>