-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
76 lines (66 loc) · 2.25 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
<project name="klik" default="help" basedir=".">
<property file="build.properties" />
<property name="jar.name" value="klik-${version}.jar" />
<property name="war.name" value="klik-${version}.war" />
<property name="src.dir" location="src" />
<property name="build.dir" location="build" />
<property name="apt_generated.dir" location=".apt_generated" />
<property name="lib.dir" location="war/WEB-INF/lib" />
<property name="gwt.client.dir" location="klik/client"/>
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="help">
<echo level="info">
Hey!
${lib.dir}
</echo>
</target>
<target name="prepare">
<mkdir dir="${build.dir}"/>
<mkdir dir="${apt_generated.dir}" />
</target>
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.dir}">
<compilerarg value="-proc:only" />
<compilerarg value="-s" />
<compilerarg path=".apt_generated" />
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="gwt-compile" depends="compile">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<!-- src dir is added to ensure the module.xml file(s) are on the classpath -->
<pathelement location="${src.dir}"/>
<pathelement location="${build.dir}"/>
<path refid="project.classpath"/>
</classpath>
<jvmarg value="-Xmx512M"/>
<arg value="${gwt.module.name}"/>
</java>
</target>
<target name="jar" depends="compile">
<jar jarfile="${lib.dir}/${jar.name}" basedir="${build.dir}/">
<!-- Don't wrap any of the client only code into the JAR -->
<exclude name="${gwt.client.dir}/**/*.class"/>
</jar>
</target>
<target name="war" depends="gwt-compile, jar">
<war basedir="war" destfile="${war.name}" webxml="war/WEB-INF/web.xml">
<exclude name="WEB-INF/**" />
<webinf dir="war/WEB-INF/">
<include name="classes/${server.resources.name}/**" />
<include name="**/*.jar" />
<!-- <exclude name="**/gwt-dev.jar" /> -->
<exclude name="**/gwt-user.jar" />
</webinf>
</war>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${apt_generated.dir}" />
</target>
</project>