forked from cga-harvard/geonode-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
148 lines (126 loc) · 5.95 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="geonode-client" default="dist" basedir=".">
<description>
Ready GXP Build File
</description>
<property name="build" location="build"/>
<target name="init">
<mkdir dir="${build}"/>
<echo message="pulling in ringo (ignore fatal warning)"/>
<mkdir dir="${build}/ringo"/>
<exec executable="git" dir="${build}/ringo" failonerror="false">
<arg line="clone -nq git://github.com/ringo/ringojs.git ."/>
</exec>
<exec executable="git" dir="${build}/ringo" failonerror="true">
<arg line="pull origin master"/>
</exec>
<exec executable="git" dir="${build}/ringo" failonerror="true">
<arg line="checkout e0dce2be640fc6fb43a1239d252948d10687ba9c"/>
</exec>
<echo message="building ringo jars"/>
<ant dir="${build}/ringo" target="jar"/>
<!-- uncomment this if you have additional jars in a lib dir
<copy todir="${build}/ringo/lib" flatten="true" includeEmptyDirs="false">
<fileset dir="lib"/>
</copy>
-->
<echo message="pulling in buildkit (ignore fatal warning)"/>
<mkdir dir="${build}/buildkit"/>
<exec executable="git" dir="${build}/buildkit" failonerror="false">
<arg line="clone -nq git://github.com/tschaub/buildkit.git ."/>
</exec>
<exec executable="git" dir="${build}/buildkit" failonerror="true">
<arg line="pull origin master"/>
</exec>
<exec executable="git" dir="${build}/buildkit" failonerror="true">
<arg line="checkout 86eacbd7b3bf62b8e99f46911dd5a633464b8570"/>
</exec>
</target>
<target name="buildjs">
<mkdir dir="${build}/${ant.project.name}/WEB-INF/app/static/script"/>
<java jar="${build}/ringo/run.jar" fork="true" failonerror="true">
<sysproperty key="ringo.classpath" path="${build}/ringo/lib/**"/>
<arg path="${build}/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, 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="${build}/ringo/lib"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app">
<fileset dir="app">
<exclude name="**/externals/**"/>
<exclude name="**/script/**"/>
</fileset>
<fileset dir="${build}/buildkit/lib"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF">
<fileset file="buildjs.cfg"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/ext">
<fileset dir="app/static/externals/ext"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/gxp/theme">
<fileset dir="app/static/externals/gxp/src/theme"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/geoext/resources">
<fileset dir="app/static/externals/geoext/resources"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/PrintPreview/resources">
<fileset dir="app/static/externals/PrintPreview/resources"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/openlayers/theme">
<fileset dir="app/static/externals/openlayers/theme"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/externals/openlayers/img">
<fileset dir="app/static/externals/openlayers/img"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/theme/ux/colorpicker">
<fileset file="app/static/script/ux/colorpicker/color-picker.ux.css"/>
<fileset file="app/static/script/ux/colorpicker/picker.gif"/>
<fileset file="app/static/script/ux/colorpicker/side_slider.jpg"/>
<fileset file="app/static/script/ux/colorpicker/mask.png"/>
</copy>
<copy todir="${build}/${ant.project.name}/WEB-INF/app/static/theme/ux/fileuploadfield">
<fileset dir="app/static/script/ux/fileuploadfield/css"/>
</copy>
</target>
<target name="war" depends="dist" description="create web archive">
<echo>Creating WAR file.</echo>
<war destfile="build/${ant.project.name}.war" needxmlfile="false">
<fileset dir="${build}/${ant.project.name}/WEB-INF/app/static"/>
</war>
</target>
<!-- war with ringo
<target name="war" depends="dist" description="create web archive">
<echo>Creating WAR file.</echo>
<war destfile="build/${ant.project.name}.war" webxml="src/main/webapp/WEB-INF/web.xml">
<fileset dir="${build}/${ant.project.name}">
<exclude name="**/web*.xml"/>
</fileset>
</war>
</target>
-->
<target name="zip" depends="dist" description="create zip with static files">
<echo>Creating ZIP file of static files</echo>
<zip destfile="build/${ant.project.name}.zip">
<fileset dir="${build}/${ant.project.name}/WEB-INF/app/static"/>
</zip>
</target>
<target name="debug">
<java jar="${build}/ringo/run.jar" fork="true">
<sysproperty key="ringo.classpath" path="${build}/ringo/lib/**"/>
<arg path="app/main.js"/>
</java>
</target>
<target name="clean" description="remove previous build and all dependencies">
<delete dir="${build}"/>
</target>
</project>