-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
174 lines (155 loc) · 6.62 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?xml version="1.0" encoding="utf-8" ?>
<project name="InjectingRequestFactory" default="build" basedir=".">
<!-- Arguments to gwtc and devmode targets -->
<property name="gwt.args" value=""/>
<!-- Configure path to GWT SDK -->
<property name="gwt.sdk" location="/Users/mgenov/Development/gwt-2.4.0-rc1"/>
<!-- Configure build path -->
<property name="lib" value="lib"/>
<property name="build.dir" value="build"/>
<path id="project.class.path">
<pathelement location="${build.dir}/WEB-INF/classes"/>
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<pathelement location="${gwt.sdk}/gwt-dev.jar"/>
<pathelement location="${gwt.sdk}/gwt-servlet-deps.jar"/>
<!-- Add any additional non-server libs (such as JUnit) -->
<pathelement location="${lib}"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="init" description="Copy libs to WEB-INF/lib">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/WEB-INF/lib"/>
<copy todir="${build.dir}/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar"/>
<copy todir="${build.dir}/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-deps.jar"/>
<copy todir="${build.dir}/WEB-INF/lib">
<fileset dir="${lib}" includes="**/*.jar"/>
</copy>
<!-- Copy web configuration and content -->
<copy todir="${build.dir}">
<fileset dir="war" includes="**/*.*"/>
</copy>
</target>
<target name="javac" depends="init" description="Compile java source to bytecode">
<mkdir dir="${build.dir}/WEB-INF/classes"/>
<javac srcdir="src" includes="**" encoding="utf-8"
destdir="${build.dir}/WEB-INF/classes"
source="1.6" target="1.6" nowarn="true"
debug="true" debuglevel="lines,vars,source" includeantruntime="true">
<classpath refid="project.class.path"/>
</javac>
<copy todir="${build.dir}/WEB-INF/classes">
<fileset dir="src" excludes="**/*.java"/>
<fileset dir="src" excludes="**/*.xml"/>
</copy>
</target>
<target name="gwtc" depends="javac" description="GWT compile to JavaScript (production mode)">
<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"/>
<arg line="-war"/>
<arg value="${build.dir}"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}"/>
<arg value="com.clouway.requestfactory.app.MySampleApplication"/>
</java>
</target>
<target name="devmode" depends="javac" description="Run development mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<arg value="-startupUrl"/>
<arg value="MySampleApplication.html"/>
<arg line="-war"/>
<arg value="${build.dir}"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}"/>
<arg value="com.clouway.requestfactory.app.MySampleApplication"/>
</java>
</target>
<target name="eclipse.generate" depends="init" description="Generate eclipse project">
<java failonerror="true" fork="true" classname="com.google.gwt.user.tools.WebAppCreator">
<classpath>
<path refid="project.class.path"/>
</classpath>
<arg value="-XonlyEclipse"/>
<arg value="-ignore"/>
<arg value="com.google.gwt.sample.dynatablerf.DynaTableRf"/>
</java>
</target>
<!--
Test targets suppressed because -junit argument was not specified when running webAppCreator.
<target name="javac.tests" depends="javac" description="Compiles test code">
<javac srcdir="test" includes="**" encoding="utf-8"
source="1.5" target="1.5" nowarn="true"
destdir="war/WEB-INF/classes"
debug="true" debuglevel="lines,vars,source">
<classpath location="path_to_the_junit_jar"/>
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="test.dev" depends="javac.tests" description="Run development mode tests">
<mkdir dir="reports/htmlunit.dev" />
<junit fork="yes" printsummary="yes" haltonfailure="yes">
<jvmarg line="-Xmx256m" />
<sysproperty key="gwt.args" value="-standardsMode -logLevel WARN" />
<sysproperty key="java.awt.headless" value="true" />
<classpath>
<pathelement location="src" />
<pathelement location="test" />
<path refid="project.class.path" />
<pathelement location="../../validation-api-1.0.0.GA.jar" />
<pathelement location="../../validation-api-1.0.0.GA-sources.jar" />
<pathelement location="path_to_the_junit_jar" />
</classpath>
<batchtest todir="reports/htmlunit.dev" >
<fileset dir="test" >
<include name="**/*Test.java" />
</fileset>
</batchtest>
<formatter type="plain" />
<formatter type="xml" />
</junit>
</target>
<target name="test.prod" depends="javac.tests" description="Run production mode tests">
<mkdir dir="reports/htmlunit.prod" />
<junit fork="yes" printsummary="yes" haltonfailure="yes">
<jvmarg line="-Xmx256m" />
<sysproperty key="gwt.args" value="-prod -standardsMode -logLevel WARN -standardsMode -out www-test" />
<sysproperty key="java.awt.headless" value="true" />
<classpath>
<pathelement location="src" />
<pathelement location="test" />
<path refid="project.class.path" />
<pathelement location="../../validation-api-1.0.0.GA.jar" />
<pathelement location="../../validation-api-1.0.0.GA-sources.jar" />
<pathelement location="path_to_the_junit_jar" />
</classpath>
<batchtest todir="reports/htmlunit.prod" >
<fileset dir="test" >
<include name="**/*Test.java" />
</fileset>
</batchtest>
<formatter type="plain" />
<formatter type="xml" />
</junit>
</target>
<target name="test" description="Run development and production mode tests">
<antcall target="test.dev" />
<antcall target="test.prod" />
</target>
-->
<target name="build" depends="gwtc" description="Build this project"/>
<target name="clean" description="Cleans this project">
<delete dir="${build.dir}" failonerror="false"/>
</target>
</project>