-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_alone.xml
79 lines (70 loc) · 2.25 KB
/
build_alone.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"?>
<project name="FatJar aradon(experimental)" default="publish" basedir=".">
<!-- uncomment the above lines to use ANT outside of Eclipse -->
<property name="baseDir" value="." />
<property name="rootDir" value="../" />
<property name="buildDir" value="../bin/" />
<property name="libDir" value="../libs/" />
<property name="version.number" value="0" />
<property name="build.number" value="3" />
<target name="copy_resource">
<delete dir="${baseDir}/resource">
</delete>
<copy todir="${baseDir}/resource/config">
<fileset dir="../resource/config">
</fileset>
</copy>
<copy todir="${baseDir}/resource/html">
<fileset dir="../resource/html">
</fileset>
</copy>
</target>
<target name="copy_lib">
<delete dir="${baseDir}/lib" />
<mkdir dir="${baseDir}/lib" />
<copy todir="${baseDir}/lib">
<fileset dir="${libDir}" includes="*.jar">
</fileset>
</copy>
<copy tofile="${baseDir}/websocket.jar">
<fileset file="../publish/websocket_${version.number}.${build.number}.jar"></fileset>
</copy>
</target>
<target name="copy_source">
<delete dir="${baseDir}/main" />
<mkdir dir="${baseDir}/main" />
<mkdir dir="${baseDir}/main/src" />
<mkdir dir="${baseDir}/main/test" />
<copy todir="${baseDir}/main/src">
<fileset dir="${rootDir}/src" />
</copy>
<copy todir="${baseDir}/main/test">
<fileset dir="${rootDir}/test" />
</copy>
</target>
<target name="test_websocket" depends="copy_lib, copy_source, copy_resource">
<path id="test.classpath">
<pathelement location="${libDir}/apache/junit.jar" />
<pathelement path="./websocket.jar" />
<fileset dir="${libDir}">
<include name="*.jar"/>
</fileset>
</path>
<junit printsummary="on" haltonfailure="on" fork="true">
<classpath refid="test.classpath" />
<formatter type="xml" />
<test name="net.ion.websocket.TestAllWebSocket" todir="resource/"/>
</junit>
</target>
<target name="publish" depends="test_websocket">
<delete file="${baseDir}/websocket_fat.zip" />
<delete dir="${baseDir}/_" />
<zip destfile="${baseDir}/websocket_fat.zip">
<fileset dir="./">
<exclude name="build_alone.xml" />
<exclude name="manifest.mf" />
</fileset>
</zip>
<delete dir="${baseDir}/main" />
</target>
</project>