-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
39 lines (33 loc) · 1.28 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
<project name="Franklin" default="build" basedir=".">
<description>Nathan's Java Http Server</description>
<property name="src" location="src"/>
<property name="classes" location="classes"/>
<path id="classpath">
<pathelement path="${classes}"/>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${classes}"/>
</target>
<target name="compile">
<mkdir dir="${classes}"/>
<javac srcdir="src" destdir="${classes}" classpathref="classpath" includeantruntime="false"/>
</target>
<target name="build" depends="compile, test">
<fail message="Tests failure detected." if="test.failed" />
<jar destfile="Franklin.jar" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="httpserver.ServerMain"/>
</manifest>
</jar>
</target>
<target name="test" depends="compile">
<junit fork="yes" printsummary="on" haltonfailure="yes" haltonerror="yes" failureproperty="test.failed">
<classpath refid="classpath"/>
<formatter type="brief" usefile="false"/>
<test name="tests.TestSuite" haltonfailure="no"/>
</junit>
</target>
</project>