-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
78 lines (65 loc) · 1.94 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" ?>
<project name="ShinyRestframework" default="build">
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<target name="init">
<tstamp />
<mkdir dir="${build}" />
</target>
<path id="classpath.libs">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<target name="build" depends="init" description="compile the source ">
<javac srcdir="${src}" destdir="${build}">
<classpath refid="classpath.libs">
</classpath>
</javac>
<copy todir="${build}/META-INF">
<fileset dir="${src}/META-INF"/>
</copy>
<copy file="${src}/log4j.properties" tofile="${build}/log4j.properties"/>
</target>
<target name="clean" description="clean up">
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<target name="run" depends="build">
<java classname="evs.rest.demo.Test" fork="true">
<classpath>
<pathelement location="${build}"/>
<path refid="classpath.libs"></path>
</classpath>
</java>
</target>
<target name="test">
<antcall target="testJSON"></antcall>
<antcall target="testXML"></antcall>
</target>
<target name="testJSON" depends="build">
<junit>
<classpath>
<pathelement location="${build}"/>
<path refid="classpath.libs"></path>
</classpath>
<formatter type="brief" usefile="false" />
<test name="evs.rest.test.TestRestServiceJSON" />
</junit>
</target>
<target name="testXML" depends="build">
<junit>
<classpath>
<pathelement location="${build}"/>
<path refid="classpath.libs"></path>
</classpath>
<formatter type="brief" usefile="false" />
<test name="evs.rest.test.TestRestServiceXML" />
</junit>
</target>
<target name="dist" depends="build" description="generate the distribution">
<mkdir dir="${dist}/lib" />
<jar jarfile="${dist}/lib/ShinyRestframework-${DSTAMP}.jar" basedir="${build}" />
</target>
</project>