-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
146 lines (129 loc) · 6.8 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="FitScheduler" default="war" basedir=".">
<!-- Arguments to gwtc and devmode targets -->
<property name="gwt.args" value="" />
<!-- Configure path to GWT SDK -->
<property name="gwt.sdk" location="C:/DEVELOPMENT/gwt-2.4.0" />
<property name="src.dir" value="src"/>
<property name="lib.dir" value="lib"/>
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes"/>
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
<fileset dir="${lib.dir}" includes="**/*.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" />
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-deps.jar" />
<!-- Add any additional server libs that need to be copied -->
</target>
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="project.class.path"/>
<!-- ============================================================================== -->
<!-- Target: javac -->
<!-- ============================================================================== -->
<target name="javac" depends="libs" description="Compile java source to bytecode">
<mkdir dir="war/WEB-INF/classes"/>
<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">
<classpath refid="project.class.path"/>
</javac>
<copy todir="war/WEB-INF/classes">
<fileset dir="src" excludes="**/*.java, **/*.groovy"/>
</copy>
</target>
<!-- ============================================================================== -->
<!-- Target: groovyc -->
<!-- ============================================================================== -->
<target name="groovyc" depends="javac" description="Compiles the groovy classes">
<echo>Compiling groovy classes</echo>
<groovyc srcdir="${src.dir}" destdir="war/WEB-INF/classes">
<classpath>
<path refid="project.class.path"/>
</classpath>
<javac source="1.6" target="1.6" debug="on"/>
</groovyc>
</target>
<!-- ============================================================================== -->
<!-- Target: gwtc -->
<!-- ============================================================================== -->
<target name="gwtc" depends="groovyc" description="GWT compile to JavaScript">
<echo>Compiling Java to Javascript</echo>
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
<pathelement location="../../validation-api-1.0.0.GA.jar" />
<pathelement location="../../validation-api-1.0.0.GA-sources.jar" />
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx256M"/>
<arg line="-war"/>
<arg value="war"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}"/>
<arg value="com.caiso.fit.fitScheduler.FitScheduler"/>
</java>
</target>
<!-- ============================================================================== -->
<!-- Target: devmode -->
<!-- ============================================================================== -->
<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"/>
<pathelement location="../../validation-api-1.0.0.GA.jar" />
<pathelement location="../../validation-api-1.0.0.GA-sources.jar" />
</classpath>
<jvmarg value="-Xmx256M"/>
<arg value="-startupUrl"/>
<arg value="FitScheduler.html"/>
<arg line="-war"/>
<arg value="war"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg line="${gwt.args}"/>
<arg value="com.caiso.fit.fitScheduler.FitScheduler"/>
</java>
</target>
<!-- ============================================================================== -->
<!-- Target: eclipse.generate -->
<!-- ============================================================================== -->
<target name="eclipse.generate" depends="libs" 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.caiso.fit.fitScheduler.FitScheduler"/>
</java>
</target>
<!-- ============================================================================== -->
<!-- Target: hosted -->
<!-- ============================================================================== -->
<target name="hosted" depends="devmode" description="Run development mode (NOTE: the 'hosted' target is deprecated)" />
<!-- ============================================================================== -->
<!-- Target: build -->
<!-- ============================================================================== -->
<target name="build" depends="gwtc" description="Build this project" />
<!-- ============================================================================== -->
<!-- Target: war -->
<!-- ============================================================================== -->
<target name="war" depends="build" description="Create a war file">
<echo>Creating war file</echo>
<zip destfile="FitScheduler.war" basedir="war"/>
</target>
<!-- ============================================================================== -->
<!-- Target: clean -->
<!-- ============================================================================== -->
<target name="clean" description="Cleans this project">
<delete dir="war/WEB-INF/classes" failonerror="false" />
<delete dir="war/fitScheduler" failonerror="false" />
<delete file="FitScheduler.war" failonerror="false" />
</target>
</project>