-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
157 lines (140 loc) · 7.28 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
<?xml version="1.0" encoding="utf-8" ?>
<project name="EUOSMEGWT" default="GEOSS" basedir=".">
<!-- For local builds you can configure the path to GWT SDK here:
<property name="gwt.sdk" location="E:\\software\\eclipse\\galileo35\\eclipse-SDK-3.5.1-win32\\eclipse\\plugins\\com.google.gwt.eclipse.sdkbundle.2.1.1_2.1.1.v201012170127\\gwt-2.1.1" />
When configuring Hudson add the following in the properties (replace /home/tomcat6-hud/software/gwt/gwt-2.1.1 with the actual path to the desired GWT SDK):
gwt.sdk= /home/tomcat6-hud/software/gwt/gwt-2.1.1
-->
<property name="gwt.module.name" value="eu.europa.ec.jrc.euosme.gwt.EUOSMEGWT"/>
<property name="server.resources.name" value="server_resources"/>
<property name="jar.name" value="buildtutorial.jar"/>
<property name="war.name" value="buildtutorial.war"/>
<property name="src.dir" location="src"/>
<property name="server.resources.dir" location="war/${server.resources.name}"/>
<property name="build.dir" location="build"/>
<property name="build.server.resources.dir" location="war/WEB-INF/classes/server_resources"/>
<property name="lib.dir" location="war/WEB-INF/lib"/>
<property name="gwt.client.dir" location="com/rubiconred/soauiext/client"/>
<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"/>
<!-- 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.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"/>
</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"/>
<path refid="project.class.path"/>
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx1024M"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="eu.europa.ec.jrc.euosme.gwt.EUOSMEGWT"/>
<arg value="-localWorkers" />
<arg value="4" />
</java>
</target>
<target name="war" depends="gwtc" description="Create a war file">
<delete file = "EUOSME.war"/>
<zip destfile="EUOSME.war" basedir="war"/>
</target>
<target name="GEOSS" depends="war" description="Package for GEOSS mode">
<copy file="app_mode/GEOSS/log4j.properties" tofile="war/WEB-INF/classes/log4j.properties" overwrite="true"/>
<copy file="app_mode/GEOSS/web.xml" tofile="war/WEB-INF/web.xml" overwrite="true"/>
<zip destfile="EUOSME_GEOSS.war" basedir="war"/>
</target>
<target name="RDSI" depends="war" description="Package for RDSI mode">
<copy file="app_mode/RDSI/log4j.properties" tofile="war/WEB-INF/classes/log4j.properties" overwrite="true"/>
<copy file="app_mode/RDSI/web.xml" tofile="war/WEB-INF/web.xml" overwrite="true"/>
<zip destfile="EUOSME_RDSI.war" basedir="war"/>
</target>
<target name="GEOPORTAL" depends="war" description="Package for GEOPORTAL mode">
<copy file="app_mode/GEOPORTAL/log4j.properties" tofile="war/WEB-INF/classes/log4j.properties" overwrite="true"/>
<copy file="app_mode/GEOPORTAL/web.xml" tofile="war/WEB-INF/web.xml" overwrite="true"/>
<zip destfile="EUOSME_GEOPORTAL.war" basedir="war"/>
</target>
<target name="EENVPLUS" depends="war" description="Package for EENVPLUS mode">
<copy file="app_mode/EENVPLUS/log4j.properties" tofile="war/WEB-INF/classes/log4j.properties" overwrite="true"/>
<copy file="app_mode/EENVPLUS/web.xml" tofile="war/WEB-INF/web.xml" overwrite="true"/>
<zip destfile="EUOSME_EENVPLUS.war" basedir="war"/>
</target>
<target name="ALL" depends="GEOSS,RDSI,GEOPORTAL,EENVPLUS" description="Package for GEOPORTAL mode"/>
<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="C:\Program Files\Eclipse\plugins\org.junit_3.8.2.v3_8_2_v20100427-1100\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="C:/gwt-2.6.1/validation-api-1.0.0.GA.jar" />
<pathelement location="C:/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar" /-->
<pathelement location="C:\Program Files\Eclipse\plugins\org.junit_3.8.2.v3_8_2_v20100427-1100\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 -war www-test" />
<sysproperty key="java.awt.headless" value="true" />
<classpath>
<pathelement location="src" />
<pathelement location="test" />
<path refid="project.class.path" />
<pathelement location="C:/gwt-2.6.1/validation-api-1.0.0.GA.jar" />
<pathelement location="C:/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar" />
<pathelement location="C:\Program Files\Eclipse\plugins\org.junit_3.8.2.v3_8_2_v20100427-1100\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>
</project>