forked from planetfederal/GeoExplorer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
138 lines (117 loc) · 5.37 KB
/
build.xml
File metadata and controls
138 lines (117 loc) · 5.37 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="geoexplorer" default="dist" basedir=".">
<description>
GeoExplorer Build File
</description>
<property name="build" location="build"/>
<property name="geoexplorer.data" value="profiles/default"/>
<property name="app.port" value="6969"/>
<!-- Override from external properties file -->
<property file="${geoexplorer.data}/build/build.properties" />
<target name="init">
<echo message="pulling in submodules"/>
<exec executable="git" failonerror="true">
<arg line="submodule init"/>
</exec>
<exec executable="git" failonerror="true">
<arg line="submodule sync"/>
</exec>
<exec executable="git" failonerror="true">
<arg line="submodule update"/>
</exec>
<echo message="building ringo jars"/>
<ant dir="externals/ringojs" target="jar"/>
<copy todir="externals/ringojs/lib" flatten="true" includeEmptyDirs="false">
<fileset dir="lib"/>
</copy>
</target>
<target name="buildjs">
<mkdir dir="${build}/${ant.project.name}/WEB-INF/app/static/script"/>
<java jar="externals/ringojs/run.jar" fork="true" failonerror="true">
<sysproperty key="ringo.home" path="externals/ringojs"/>
<arg path="externals/buildkit/lib/buildkit/build.js"/>
<arg line="-o ${build}/${ant.project.name}/WEB-INF/app/static/script buildjs.cfg"/>
</java>
</target>
<target name="dist" depends="init, test, buildjs, redist"/>
<target name="redist">
<mkdir dir="${build}/${ant.project.name}"/>
<copy todir="${build}/${ant.project.name}">
<fileset dir="src/main/webapp/">
</fileset>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/lib" flatten="true" includeEmptyDirs="false">
<fileset dir="externals/ringojs/lib"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app">
<fileset dir="app">
<exclude name="**/externals/**"/>
<exclude name="**/script/**"/>
</fileset>
</copy>
<!-- copy Ext resources -->
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/ext">
<fileset dir="app/static/externals/ext"/>
</copy>
<!-- copy OpenLayers resources -->
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/openlayers/theme">
<fileset dir="app/static/externals/openlayers/theme"/>
</copy>
<!-- copy GeoExt resources -->
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/GeoExt/resources">
<fileset dir="app/static/externals/GeoExt/resources"/>
</copy>
<!-- copy gxp resources -->
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/gxp/src/theme">
<fileset dir="app/static/externals/gxp/src/theme"/>
</copy>
<!-- copy PrintPreview resources -->
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/PrintPreview/resources">
<fileset dir="app/static/externals/PrintPreview/resources"/>
</copy>
<!-- copy Proj4js resources -->
<copy file="app/static/externals/proj4js/lib/proj4js-compressed.js"
tofile="${build}/geoexplorer/WEB-INF/app/static/externals/proj4js/lib/proj4js-compressed.js" />
<copy todir="${build}/geoexplorer/WEB-INF/app/static/externals/proj4js/lib/defs">
<fileset dir="app/static/externals/proj4js/lib/defs"/>
</copy>
<copy file="${geoexplorer.data}/build/web.xml"
tofile="${build}/${ant.project.name}/WEB-INF/web.xml"
overwrite="true"/>
<war destfile="${ant.project.name}.war" webxml="${geoexplorer.data}/build/web.xml">
<webinf dir="${build}/${ant.project.name}/WEB-INF/">
<include name="weblogic.xml"/>
<include name="app/**"/>
</webinf>
<lib dir="${build}/${ant.project.name}/WEB-INF/lib"/>
</war>
</target>
<target name="debug">
<java jar="externals/ringojs/run.jar" fork="true">
<sysproperty key="GEOEXPLORER_DATA" path="${geoexplorer.data}"/>
<sysproperty key="app.proxy.geoserver" value="${app.proxy.geoserver}"/>
<sysproperty key="ringo.home" path="externals/ringojs"/>
<arg path="app/main.js"/>
<arg line="-p ${app.port}"/>
</java>
</target>
<target name="debugall">
<java jar="externals/ringojs/run.jar" fork="true">
<sysproperty key="GEOEXPLORER_DATA" path="${geoexplorer.data}"/>
<sysproperty key="app.proxy.geoserver" value="${app.proxy.geoserver}"/>
<sysproperty key="ringo.home" path="externals/ringojs"/>
<arg value="-d"/>
<arg path="app/main.js"/>
<arg line="-p ${app.port}"/>
</java>
</target>
<target name="test">
<java jar="externals/ringojs/run.jar" fork="true" failonerror="no">
<sysproperty key="ringo.home" path="externals/ringojs"/>
<arg path="tests/all.js"/>
</java>
</target>
<target name="clean" description="remove previous build">
<delete dir="${build}"/>
</target>
</project>