-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.xml
53 lines (47 loc) · 1.67 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="test" name="http">
<property name="name" value="http"/>
<target name="check">
<uptodate property="required" targetfile="bin/${name}.jar">
<srcfiles dir="src" includes="**/*.java"/>
<srcfiles file="mime.txt"/>
</uptodate>
</target>
<target name="build" depends="check" unless="required">
<echo>Building (${name})</echo>
<mkdir dir="tmp/cls"/>
<javac srcdir="src" target="1.6" source="1.6" destdir="tmp/cls" debug="on" deprecation="off" classpath="src;lib/json.jar" encoding="UTF-8"/>
<mkdir dir="tmp/jar"/>
<copy todir="tmp/jar">
<fileset dir="tmp/cls"/>
</copy>
<copy file="mime.txt" todir="tmp/jar"/>
<jar jarfile="tmp/${name}.jar">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="se.rupy.http.Daemon"/>
<attribute name="Premain-Class" value="se.rupy.http.Daemon"/>
</manifest>
<fileset dir="tmp/jar"/>
</jar>
<mkdir dir="bin"/>
<copy file="tmp/${name}.jar" todir="bin"/>
<delete dir="tmp" quiet="yes"/>
</target>
<target name="test" depends="build">
<java fork="yes" jar="bin/http.jar">
<!--sysproperty key="java.security.manager" value=""/>
<sysproperty key="java.security.policy" value="policy"/>
<arg line="-host"/>
<arg line="-verbose"/>
<arg line="-debug"/-->
<arg line="-timeout 1"/>
<arg line="-threads 1"/>
<arg line="-delay 60"/>
<arg line="-test"/>
</java>
</target>
<target name="doc">
<javadoc access="public" sourcepath="src" destdir="doc" executable="javadoc" encoding="UTF-8" charset="UTF-8" docencoding="UTF-8" stylesheetfile="sheet.css"/>
</target>
</project>