-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
91 lines (78 loc) · 3.7 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
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="utf-8" ?>
<project name="gwt-earth-3" default="jar" basedir=".">
<!-- Load properties -->
<property file="build.properties"/>
<property name="jar.version" value="0.0"/>
<!-- Arguments to gwtc and devmode targets -->
<property name="gwt.args" value="" />
<property name="gwt.style" value="OBF" />
<property name="build.dir" location="${basedir}/build" />
<property name="class.dir" location="${build.dir}/classes" />
<property name="dist.dir" location="${build.dir}/dist" />
<property name="jar.file.name" value="GwtEarth3-${jar.version}.jar" />
<property name="jar.file.path" value="${build.dir}/${jar.file.name}" />
<property name="javadoc.jar.file.name" value="GwtEarth3-${jar.version}-JavaDoc.zip" />
<property name="javadoc.jar.file.path" value="${build.dir}/${javadoc.jar.file.name}" />
<property name="javadoc.output.dir" value="${build.dir}/javadoc"/>
<property name="gwt.module" value="com.nitrous.gwt.earth.GwtEarthDemo"/>
<path id="project.class.path">
<pathelement location="${class.dir}" />
<pathelement location="${gwt.sdk}/gwt-user.jar" />
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar" />
<fileset dir="${gwt.sdk}" includes="validation-api*.jar" />
</path>
<target name="javadoc" description="Generate JavaDoc">
<javadoc destdir="${javadoc.output.dir}" windowtitle="GWT-Earth-3-${jar.version}" classpathref="project.class.path">
<fileset dir="src">
<exclude name="**/client/demo/**/*"/>
<exclude name="**/*.xml"/>
</fileset>
</javadoc>
</target>
<target name="package-javadoc" description="Generate and package the javadoc" depends="javadoc">
<delete dir="${javadoc.jar.file.path}" failonerror="false"/>
<zip destfile="${javadoc.jar.file.path}" basedir="${javadoc.output.dir}" />
</target>
<target name="javac" description="Compile java source">
<mkdir dir="${class.dir}" />
<javac includes="**" encoding="utf-8" destdir="${class.dir}" source="1.5" target="1.5" nowarn="true" debug="true" debuglevel="lines,vars,source">
<src path="${basedir}/src" />
<src path="${basedir}/test" />
<classpath refid="project.class.path" />
</javac>
<copy todir="${class.dir}">
<fileset dir="src">
<exclude name="**/.svn/**"/>
</fileset>
</copy>
</target>
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
<echo>GWT Compile ${gwt.style} ${gwt.module}</echo>
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src" />
<path refid="project.class.path" />
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M" />
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}" />
<arg value="${gwt.module}" />
<arg line="-style" />
<arg value="${gwt.style}" />
</java>
</target>
<target name="quick-jar" depends="javac" description="Create a jar file with classes, source and property files">
<!-- create the war file -->
<jar destfile="${jar.file.path}" basedir="${class.dir}" />
</target>
<target name="jar" depends="gwtc" description="Create a jar file with classes, source and property files">
<!-- create the war file -->
<zip destfile="${jar.file.path}" basedir="${class.dir}" />
</target>
<target name="clean" description="Cleans this project">
<delete dir="${build.dir}" failonerror="false" />
<delete dir="${jar.file.path}" failonerror="false" />
<delete dir="war/WEB-INF/classes" failonerror="false" />
</target>
</project>