-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
77 lines (71 loc) · 3.35 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Build GPA" basedir="." default="war">
<property name="gwt.module.name" value="com.geekvigarista.scrummanager.GWT_ScrumManager"/>
<property name="server.resources.name" value="server_resources"/>
<property name="jar.name" value="gpa.jar"/>
<property name="war.name" value="gpa.war"/>
<property name="src.dir" location="src"/>
<property name="server.resources.dir" location="war/${server.resources.name}"/>
<property name="build.dir" location="build"/>
<property name="build.server.resources.dir" location="war/WEB-INF/classes/server_resources"/>
<property name="lib.dir" location="war/WEB-INF/lib"/>
<property name="gwt.client.dir" location="com/geekvigarista/scrummanager/client"/>
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="prepare">
<mkdir dir="${build.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<!-- Compile the java source code using javac -->
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.dir}">
<classpath refid="project.classpath"/>
</javac>
</target>
<!-- Invoke the GWT compiler to create the Javascript for us -->
<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>
<!-- Package the compiled Java source into a JAR file -->
<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>
<!-- Copy the static server resources into the required
directory ready for packaging -->
<target name="copy-resources">
<copy todir="${build.server.resources.dir}" preservelastmodified="true">
<fileset dir="${server.resources.dir}"/>
</copy>
</target>
<!-- Package the JAR file, Javascript, static resources
and external libraries into a WAR file -->
<target name="war" depends="gwt-compile, jar, copy-resources">
<war basedir="war" destfile="${war.name}" webxml="war/WEB-INF/web.xml">
<exclude name="WEB-INF/**" />
<exclude name="${server.resources.name}/**"/>
<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>
</project>