-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
80 lines (70 loc) · 2.44 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
79
80
<!DOCTYPE project>
<project default="war" basedir=".">
<!-- Set catalina.home, hamcrest.home and junit.home in build.properties -->
<property file="build.properties" />
<property name="warfile.dir" value="build" />
<property name="war.dir" value="war" />
<property name="classes.dir" value="${war.dir}/WEB-INF/classes" />
<property name="warlib.dir" value="${war.dir}/WEB-INF/lib" />
<property name="lib.dir" value="lib" />
<property name="src.dir" value="src" />
<property name="gwt.name" value="uk.ac.nott.mrl.homework.Device" />
<path id="classpath">
<fileset dir="${warlib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.class.path}" />
</path>
<path id="classpath.gwt">
<path path="${src.dir}"/>
<fileset dir="${lib.dir}">
<include name="**.jar"/>
</fileset>
<pathelement path="${classes.dir}" />
</path>
<target name="clean">
<delete dir="${classes.dir}" />
</target>
<target name="makedirs">
<mkdir dir="${warfile.dir}" />
<mkdir dir="${classes.dir}" />
</target>
<target name="compile" depends="makedirs"
description="Compile classes into web archive dir">
<javac destdir="${classes.dir}" debug="on" deprecation="on"
includeAntRuntime="no" srcdir="${src.dir}">
<exclude name="uk/ac/nott/mrl/homework/client/**" />
<compilerarg value="-Xlint:unchecked" />
<classpath refid="classpath"/>
</javac>
</target>
<target name="compile-gwt" depends="compile"
description="Compile GWT web interface">
<java classpathref="classpath.gwt" failonerror="true" fork="true"
classname="com.google.gwt.dev.Compiler">
<arg line="-war ${war.dir}"/>
<arg line="${gwt.name}"/>
</java>
</target>
<target name="war" depends="compile-gwt" description="Create the web archive file">
<copy todir="${classes.dir}">
<fileset dir="${src.dir}">
<exclude name="uk/ac/nott/mrl/homework/client/**" />
<exclude name="**/*.gwt.xml" />
<exclude name="**/*.java"/>
</fileset>
</copy>
<jar jarfile="${warfile.dir}/control.war"
basedir="${war.dir}">
<include name="**/*" />
</jar>
</target>
<target name="install" depends="war" description="Copies the war filoe to a local tomcat directory">
<delete dir="${install.dir}/control.war" />
<delete dir="${install.dir}/control" />
<copy file="${warfile.dir}/control.war" todir="${install.dir}"/>
</target>
</project>