aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2014-04-19 22:44:21 +0200
committerPacien TRAN-GIRARD2014-04-19 22:44:21 +0200
commita5567218883fecda68577cd0a06d8436a6ec69d9 (patch)
tree9d48eda8a340d3f5d9747ba9d1cf2db54339fb41
parentaa9d3526dc7ad09331efd284d28abe9da5939f26 (diff)
downloadesieequest-a5567218883fecda68577cd0a06d8436a6ec69d9.tar.gz
Add ant build file
-rw-r--r--build.xml167
1 files changed, 167 insertions, 0 deletions
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..30ab150
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,167 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="ESIEEquest" default="build" basedir=".">
3 <!-- Arguments to gwtc and devmode targets -->
4 <property name="gwt.args" value="" />
5
6 <!-- Configure path to GWT SDK -->
7 <property name="gwt.sdk" location="/usr/local/gwt-2.6.0" />
8
9 <path id="project.class.path">
10 <pathelement location="war/WEB-INF/classes" />
11 <pathelement location="${gwt.sdk}/gwt-user.jar" />
12 <fileset dir="${gwt.sdk}" includes="gwt-dev*.jar" />
13 <!-- Add any additional non-server libs (such as JUnit) -->
14 <fileset dir="war/WEB-INF/lib" includes="**/*.jar" />
15 </path>
16
17 <target name="libs" description="Copy libs to WEB-INF/lib">
18 <mkdir dir="war/WEB-INF/lib" />
19 <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
20 <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-deps.jar" />
21 <!-- Add any additional server libs that need to be copied -->
22 <copy todir="war/WEB-INF/lib" file="lib/guava-16.0.1.jar" />
23 <copy todir="war/WEB-INF/lib" file="lib/guava-gwt-16.0.1.jar" />
24 </target>
25
26 <target name="javac" depends="libs" description="Compile java source to bytecode">
27 <mkdir dir="war/WEB-INF/classes" />
28 <javac srcdir="src" includes="**" encoding="utf-8" destdir="war/WEB-INF/classes" source="1.5" target="1.5" nowarn="true" debug="true" debuglevel="lines,vars,source">
29 <classpath refid="project.class.path" />
30 </javac>
31 <copy todir="war/WEB-INF/classes">
32 <fileset dir="src" excludes="**/*.java" />
33 </copy>
34 </target>
35
36 <target name="gwtc" depends="javac" description="GWT compile to JavaScript (production mode)">
37 <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
38 <classpath>
39 <pathelement location="src" />
40 <path refid="project.class.path" />
41 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
42 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
43 </classpath>
44 <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
45 <jvmarg value="-Xmx256M" />
46 <arg line="-war" />
47 <arg value="war" />
48 <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
49 <arg line="${gwt.args}" />
50 <arg value="esieequest.esieequest" />
51 </java>
52 </target>
53
54 <target name="devmode" depends="javac" description="Run development mode">
55 <java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
56 <classpath>
57 <pathelement location="src" />
58 <path refid="project.class.path" />
59 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
60 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
61 </classpath>
62 <jvmarg value="-Xmx256M" />
63 <arg value="-startupUrl" />
64 <arg value="ESIEEquest.html" />
65 <arg line="-war" />
66 <arg value="war" />
67 <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
68 <arg line="${gwt.args}" />
69 <arg value="esieequest.esieequest" />
70 </java>
71 </target>
72
73 <target name="superdevmode" depends="javac" description="Run Super Dev Mode">
74 <java failonerror="true" fork="true" classname="com.google.gwt.dev.codeserver.CodeServer">
75 <classpath>
76 <pathelement location="src" />
77 <pathelement location="${gwt.sdk}/gwt-codeserver.jar" />
78 <path refid="project.class.path" />
79 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
80 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
81 </classpath>
82 <jvmarg value="-Xmx256M" />
83 <arg value="esieequest.esieequest" />
84 </java>
85 </target>
86
87 <!--
88Test targets suppressed because -junit argument was not specified when running webAppCreator.
89
90 <target name="javac.tests" depends="javac" description="Compiles test code">
91 <javac srcdir="test" includes="**" encoding="utf-8"
92 source="1.5" target="1.5" nowarn="true"
93 destdir="war/WEB-INF/classes"
94 debug="true" debuglevel="lines,vars,source">
95 <classpath location="path_to_the_junit_jar"/>
96 <classpath refid="project.class.path"/>
97 </javac>
98 </target>
99
100 <target name="test.dev" depends="javac.tests" description="Run development mode tests">
101 <mkdir dir="reports/htmlunit.dev" />
102 <junit fork="yes" printsummary="yes" haltonfailure="yes">
103 <jvmarg line="-Xmx256m" />
104 <sysproperty key="gwt.args" value="-standardsMode -logLevel WARN" />
105 <sysproperty key="java.awt.headless" value="true" />
106 <classpath>
107 <pathelement location="src" />
108 <pathelement location="test" />
109 <path refid="project.class.path" />
110 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
111 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
112 <pathelement location="path_to_the_junit_jar" />
113 </classpath>
114 <batchtest todir="reports/htmlunit.dev" >
115 <fileset dir="test" >
116 <include name="**/*Test.java" />
117 </fileset>
118 </batchtest>
119 <formatter type="plain" />
120 <formatter type="xml" />
121 </junit>
122 </target>
123
124 <target name="test.prod" depends="javac.tests" description="Run production mode tests">
125 <mkdir dir="reports/htmlunit.prod" />
126 <junit fork="yes" printsummary="yes" haltonfailure="yes">
127 <jvmarg line="-Xmx256m" />
128 <sysproperty key="gwt.args" value="-prod -standardsMode -logLevel WARN -standardsMode -war www-test" />
129 <sysproperty key="java.awt.headless" value="true" />
130 <classpath>
131 <pathelement location="src" />
132 <pathelement location="test" />
133 <path refid="project.class.path" />
134 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
135 <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
136 <pathelement location="path_to_the_junit_jar" />
137 </classpath>
138 <batchtest todir="reports/htmlunit.prod" >
139 <fileset dir="test" >
140 <include name="**/*Test.java" />
141 </fileset>
142 </batchtest>
143 <formatter type="plain" />
144 <formatter type="xml" />
145 </junit>
146 </target>
147
148 <target name="test" description="Run development and production mode tests">
149 <antcall target="test.dev" />
150 <antcall target="test.prod" />
151 </target>
152-->
153
154 <target name="hosted" depends="devmode" description="Run development mode (NOTE: the 'hosted' target is deprecated)" />
155
156 <target name="build" depends="gwtc" description="Build this project" />
157
158 <target name="war" depends="build" description="Create a war file">
159 <zip destfile="ESIEEquest.war" basedir="war" />
160 </target>
161
162 <target name="clean" description="Cleans this project">
163 <delete dir="war/WEB-INF/classes" failonerror="false" />
164 <delete dir="war/esieequest" failonerror="false" />
165 </target>
166
167</project>