-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
113 lines (99 loc) · 4.2 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
<?xml version="1.0" encoding="utf-8" ?>
<project name="OurgridPortal" default="build" basedir=".">
<!-- Configure path to GWT SDK -->
<property name="gwt.sdk" location="xlib/" />
<!-- SWT on Mac requires the -XstartOFirstThreadFlag. -->
<condition property="XstartOnFirstThreadFlag" value="-XstartOnFirstThread"
else="-Dgwt.dummy.arg1=">
<os family="mac"/>
</condition>
<!-- SWT on Mac requires the -d32 flag if the VM is 64-bit. -->
<condition property="d32Flag" value="-d32" else="-Dgwt.dummy.arg2=">
<and>
<os family="mac"/>
<equals arg1="${sun.arch.data.model}" arg2="64"/>
</and>
</condition>
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes"/>
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<pathelement location="${gwt.sdk}/gxt.jar"/>
<pathelement location="${gwt.sdk}/selenium-java-client-driver.jar"/>
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
</path>
<target name="libs" description="Copy libs to WEB-INF/lib">
<mkdir dir="war/WEB-INF/lib" />
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
<!-- Add any additional server libs that need to be copied -->
</target>
<target name="javac" depends="libs" description="Compile java source">
<mkdir dir="war/WEB-INF/classes"/>
<javac srcdir="src" includes="**" encoding="utf-8"
destdir="war/WEB-INF/classes"
source="1.6" target="1.6" nowarn="true"
debug="true" debuglevel="lines,vars,source">
<classpath refid="project.class.path"/>
</javac>
<copy todir="war/WEB-INF/classes">
<fileset dir="src" excludes="**/*.java"/>
</copy>
</target>
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src"/>
<pathelement location="${gwt.sdk}/gxt.jar"/>
<path refid="project.class.path"/>
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M"/>
<jvmarg value="${XstartOnFirstThreadFlag}"/>
<jvmarg value="${d32Flag}"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="org.ourgrid.portal.OurgridPortal"/>
</java>
</target>
<target name="hosted" depends="javac" description="Run hosted 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"/>
<jvmarg value="${XstartOnFirstThreadFlag}"/>
<jvmarg value="${d32Flag}"/>
<arg value="-startupUrl"/>
<arg value="OurgridPortal.html"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="org.ourgrid.portal.OurgridPortal"/>
</java>
</target>
<target name="hosted-debug" depends="javac" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<jvmarg value="${XstartOnFirstThreadFlag}"/>
<jvmarg value="${d32Flag}"/>
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,address=3410,suspend=y"/>
<arg value="-startupUrl"/>
<arg value="OurgridPortal.html"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="org.ourgrid.portal.OurgridPortal"/>
</java>
</target>
<target name="build" depends="gwtc" description="Build this project" />
<target name="war" depends="build" description="Create a war file">
<mkdir dir="target"/>
<zip destfile="target/ourgridportal.war" basedir="war"/>
</target>
<target name="clean" description="Cleans this project">
<delete dir="war/WEB-INF/classes" failonerror="false" />
<delete dir="war/ourgridportal" failonerror="false" />
</target>
</project>