-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
238 lines (168 loc) · 6.32 KB
/
build.xml
File metadata and controls
238 lines (168 loc) · 6.32 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!--
Main build file.
Invokes build files of individual projects.
Parameters:
- property version: version of artifacts
- env var CRAWLFJ: dst for archiving (see target desc)
David Pasch
-->
<project name="crawlframej" default="dist">
<property environment="env"/>
<!-- PARAMETER: version of artifacts -->
<property name="version" value="0-2-0a"/>
<property name="out_filename" value="${ant.project.name}_${version}"/>
<property name="conf_lib" location="conf_data/lib"/>
<property name="conf_lib_dist" location="conf_data/lib/dist"/>
<property name="conf_doc_overview" location="conf_data/doc/overview.html"/>
<property name="build" location="build"/>
<property name="build_doc" location="build/doc"/>
<property name="dist" location="dist"/>
<property name="dist_lib" location="dist/lib"/>
<property name="dist_lib_lib" location="dist/lib/lib"/>
<property name="dist_doc" location="dist/doc"/>
<property name="archive_lib" location="${env.CRAWLFJ}/lib"/>
<property name="archive_doc" location="${env.CRAWLFJ}/doc"/>
<property name="shared" location="shared"/>
<property name="sub_http" location="httpclient"/>
<property name="sub_frame_core" location="crawlframej-core"/>
<property name="sub_frame_stages" location="crawlframej-stages"/>
<property name="sub_logging" location="logging"/>
<property name="sub_dist_lib" value="dist/lib"/>
<property name="sub_dist_doc" value="dist/doc"/>
<property name="sub_lib" value="lib/jars"/>
<path id="cp-shared-lib">
<fileset dir="${shared}/lib/jars">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cp-http-jars">
<fileset dir="${sub_http}/${sub_dist_lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${sub_http}/${sub_dist_doc}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cp-http-lib">
<fileset dir="${sub_http}/${sub_lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cp-frame-core-jars">
<fileset dir="${sub_frame_core}/${sub_dist_lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${sub_frame_core}/${sub_dist_doc}">
<include name="**/*.jar"/>
</fileset>
<path id="cp-frame-core-lib">
</path>
<fileset dir="${sub_frame_core}/${sub_lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cp-frame-stages-jars">
<fileset dir="${sub_frame_stages}/${sub_dist_lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${sub_frame_stages}/${sub_dist_doc}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cp-frame-stages-lib">
<fileset dir="${sub_frame_stages}/${sub_lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cp-logging-jars">
<fileset dir="${sub_logging}/${sub_dist_lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${sub_logging}/${sub_dist_doc}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cp-logging-lib">
<fileset dir="${sub_logging}/${sub_lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="antAll">
<ant dir="${sub_logging}" target="${ant_target}" inheritAll="false"/>
<ant dir="${sub_http}" target="${ant_target}" inheritAll="false"/>
<ant dir="${sub_frame_core}" target="${ant_target}" inheritAll="false"/>
<ant dir="${sub_frame_stages}" target="${ant_target}" inheritAll="false"/>
</target>
<target name="compileAll" description="compile all sub-projects">
<antcall target="antAll">
<param name="ant_target" value="dist"/>
</antcall>
</target>
<target name="apidocAll" description="API docs of all sub-projects">
<antcall target="antAll">
<param name="ant_target" value="dist-apidoc"/>
</antcall>
</target>
<target name="dist" description="assemble application" depends="compileAll, apidocAll">
<copy todir="${dist_lib}">
<path refid="cp-logging-jars"/>
<path refid="cp-http-jars"/>
<path refid="cp-frame-core-jars"/>
<path refid="cp-frame-stages-jars"/>
<path refid="cp-shared-lib"/>
<path refid="cp-logging-lib"/>
<path refid="cp-http-lib"/>
<path refid="cp-frame-core-lib"/>
<path refid="cp-frame-stages-lib"/>
</copy>
</target>
<target name="testsAll" description="run unit tests of all sub-projects" depends="compileAll">
<antcall target="antAll">
<param name="ant_target" value="tests"/>
</antcall>
</target>
<target name="archive-init">
<fail message="Environment variable CRAWLFJ not set." unless="env.CRAWLFJ" />
</target>
<target name="archive-lib" depends="archive-init" description="archive program; req env var CRAWLFJ">
<mkdir dir="${archive_lib}"/>
<tar destfile="${archive_lib}/${out_filename}.tgz" compression="gzip">
<fileset dir="${dist_lib}">
<include name="**/*.jar"/>
</fileset>
</tar>
</target>
<target name="dist-apidoc" description="generate api doc">
<mkdir dir="${dist_doc}"/>
<javadoc
destdir="${dist_doc}"
windowtitle="crawlframej"
Overview="${conf_doc_overview}">
<packageset dir="${sub_logging}/src" defaultexcludes="no" />
<packageset dir="${sub_http}/src" defaultexcludes="no" />
<packageset dir="${sub_frame_core}/src" defaultexcludes="no" />
<packageset dir="${sub_frame_stages}/src" defaultexcludes="no" />
<classpath refid="cp-shared-lib"/>
<classpath refid="cp-logging-lib"/>
<classpath refid="cp-http-lib"/>
<classpath refid="cp-frame-core-lib"/>
<classpath refid="cp-frame-stages-lib"/>
</javadoc>
</target>
<target name="archive-apidoc" depends="archive-init" description="archive doc jar; req env var RPICK_ARCHIVE">
<mkdir dir="${archive_doc}"/>
<tar destfile="${archive_doc}/${out_filename}_javadoc.tgz" compression="gzip" basedir="${dist_doc}"/>
</target>
<target name="clean" description="clean up">
<delete dir="${dist}"/>
</target>
<target name="cleanAll" description="clean up project including all sub-projects" depends="clean">
<antcall target="antAll">
<param name="ant_target" value="clean"/>
</antcall>
</target>
<target name="test" description="something">
<echo message="${java.io.tmpdir}" />
<echo message="${env.CRAWLFJ}" />
</target>
</project>