Child: [r11] (diff)

Download this file

build.xml    392 lines (322 with data), 0 Bytes

  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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
<!-- An ANT build file for JFreeChart -->
<!-- Written by David Gilbert. -->
<!-- Tested recently with Ant 1.8.2 -->
<!-- To run this script, you need to make sure the libraries used by -->
<!-- JFreeChart are copied to the ../lib directory (or edit the -->
<!-- initialise task to point to the appropriate jar files). -->
<!-- This script will create temporary directories ../build and -->
<!-- ../distribution, as working areas. A ../javadoc directory will -->
<!-- be created for the Javadoc HTML pages. -->
<!-- If you have comments about this script, please post a message -->
<!-- on the JFreeChart developers mailing list. -->
<project name="jfreechart" default="all" basedir="..">
<!-- Initialisation. -->
<target name="initialise" description="Initialise required settings.">
<tstamp />
<property name="jfreechart.name" value="jfreechart" />
<property name="jfreechart.version" value="1.0.17" />
<property name="jfreechart-bundle-file" value="${jfreechart.name}-${jfreechart.version}-bundle.jar" />
<property name="jcommon.name" value="jcommon" />
<property name="jcommon.version" value="1.0.21" />
<property name="jcommon.jar" value="${basedir}/lib/${jcommon.name}-${jcommon.version}.jar"/>
<property name="jfreesvg.name" value="jfreesvg" />
<property name="jfreesvg.version" value="1.4" />
<property name="orsonpdf.name" value="orsonpdf" />
<property name="orsonpdf.version" value="1.3-eval" />
<property name="orsoncharts.version" value="1.0-eval" />
<property name="builddir" value="${basedir}/build" />
<property name="servlet.jar" value="${basedir}/lib/servlet.jar"/>
<property name="junit.jar" value="${basedir}/lib/junit-4.11.jar"/>
<property name="hamcrest.jar" value="${basedir}/lib/hamcrest-core-1.3.jar"/>
<property name="src.version" value="1.6"/>
<property name="target.version" value="1.6"/>
<path id="build.classpath">
<fileset dir="${basedir}/lib/">
<include name="${jcommon.name}-${jcommon.version}.jar"/>
<include name="servlet.jar"/>
</fileset>
</path>
</target>
<!-- Compile the JFreeChart classes -->
<target name="compile" depends="initialise"
description="Compile the JFreeChart source code.">
<!-- create a temp build directory -->
<mkdir dir="${basedir}/build" />
<!-- compile the source -->
<javac srcdir="${basedir}/source"
destdir="${basedir}/build"
debug="on"
deprecation="false"
source="${src.version}"
target="${target.version}">
<classpath refid="build.classpath" />
<include name="org/jfree/**"/>
<exclude name="org/jfree/chart/xml/**"/>
</javac>
<!-- copy across gorilla.jpg -->
<copy file="${basedir}/source/org/jfree/chart/gorilla.jpg" tofile="${basedir}/build/org/jfree/chart/gorilla.jpg" />
<!-- copy across .properties files -->
<copy todir="${basedir}/build/org/jfree/chart/">
<fileset dir="${basedir}/source/org/jfree/chart">
<include name="*.properties" />
</fileset>
</copy>
<copy todir="${basedir}/build/org/jfree/chart/plot">
<fileset dir="${basedir}/source/org/jfree/chart/plot">
<include name="*.properties" />
</fileset>
</copy>
<copy todir="${basedir}/build/org/jfree/chart/editor">
<fileset dir="${basedir}/source/org/jfree/chart/editor">
<include name="*.properties" />
</fileset>
</copy>
<!-- make the jar -->
<jar jarfile="${basedir}/lib/${jfreechart.name}-${jfreechart.version}.jar"
basedir="${basedir}/build" >
<manifest>
<attribute name="Specification-Title" value="JFreeChart" />
<attribute name="Specification-Version" value="${jfreechart.version}" />
<attribute name="Specification-Vendor" value="jfree.org" />
<attribute name="Implementation-Title" value="JFreeChart" />
<attribute name="Implementation-Version" value="${jfreechart.version}" />
<attribute name="Implementation-Vendor" value="jfree.org" />
</manifest>
</jar>
<!-- delete the temp directory -->
<delete dir="${basedir}/build" />
</target>
<!-- Compile the experimental classes -->
<target name="compile-experimental" depends="compile"
description="Compile the JFreeChart experimental classes">
<!-- create a temp build directory -->
<mkdir dir="${basedir}/build" />
<path id="build.experimental.classpath">
<pathelement location="${jcommon.jar}"/>
<pathelement location="${servlet.jar}"/>
<pathelement location="${basedir}/lib/${jfreechart.name}-${jfreechart.version}.jar"/>
</path>
<!-- compile the source -->
<javac srcdir="${basedir}/experimental"
destdir="${basedir}/build"
debug="on"
deprecation="false"
source="${src.version}"
target="${target.version}">
<classpath refid="build.experimental.classpath" />
<include name="org/jfree/experimental/**"/>
<exclude name="org/jfree/experimental/**/junit/*"/>
</javac>
<!-- make the jar -->
<jar jarfile="${basedir}/lib/${jfreechart.name}-${jfreechart.version}-experimental.jar"
basedir="${basedir}/build" >
</jar>
<!-- delete the temp directory -->
<delete dir="${basedir}/build" />
</target>
<!-- Generate the JFreeChart API HTML pages -->
<target name="javadoc"
description="Generate the Javadoc HTML pages."
depends="initialise">
<delete dir="${basedir}/javadoc" />
<mkdir dir="${basedir}/javadoc" />
<javadoc destdir="${basedir}/javadoc"
windowtitle="JFreeChart Class Library (version ${jfreechart.version})"
overview="${basedir}/source/overview.html"
use="yes"
linksource="yes"
splitindex="yes">
<classpath refid="build.classpath" />
<packageset dir="${basedir}/source" defaultexcludes="yes">
<include name="org/jfree/**"/>
<exclude name="org/jfree/chart/xml/**"/>
</packageset>
</javadoc>
<!-- copy across .png files -->
<copy todir="${basedir}/javadoc/images">
<fileset dir="${basedir}/docfiles">
<include name="*.png" />
</fileset>
</copy>
</target>
<!-- Create zip file containing the API HTML pages. -->
<target name="zip-javadocs"
description="Create ZIP file containing Javadoc HTML pages."
depends="javadoc">
<!-- make the zip file -->
<zip zipfile="${basedir}/${jfreechart.name}-${jfreechart.version}-javadocs.zip">
<zipfileset dir="${basedir}/javadoc"
prefix="${jfreechart.name}-${jfreechart.version}-javadocs" />
</zip>
</target>
<!-- Fill the 'distribution' directory. -->
<target name="fill-distribution" depends="compile">
<!-- delete the temporary distribution directory, if there is one -->
<delete dir="${basedir}/distribution" />
<!-- make a temporary distribution directory -->
<mkdir dir="${basedir}/distribution" />
<!-- copy across README and CHANGELOG -->
<copy file="${basedir}/README.txt" tofile="${basedir}/distribution/README.txt" />
<copy file="${basedir}/NEWS" tofile="${basedir}/distribution/NEWS" />
<copy file="${basedir}/ChangeLog" tofile="${basedir}/distribution/ChangeLog" />
<copy file="${basedir}/pom.xml" tofile="${basedir}/distribution/pom.xml" />
<!-- copy across LICENCE -->
<copy file="${basedir}/licence-LGPL.txt" tofile="${basedir}/distribution/licence-LGPL.txt" />
<!-- copy across runtime jar file and demo jar file -->
<copy file="${basedir}/lib/${jfreechart.name}-${jfreechart.version}.jar" tofile="${basedir}/distribution/lib/${jfreechart.name}-${jfreechart.version}.jar" />
<copy file="${basedir}/lib/${jfreechart.name}-${jfreechart.version}-experimental.jar" tofile="${basedir}/distribution/lib/${jfreechart.name}-${jfreechart.version}-experimental.jar" />
<copy file="${basedir}/${jfreechart.name}-${jfreechart.version}-demo.jar" tofile="${basedir}/distribution/${jfreechart.name}-${jfreechart.version}-demo.jar" failonerror="false" />
<!-- copy across source files -->
<copy todir="${basedir}/distribution/source">
<fileset dir="${basedir}/source">
<exclude name="**/CVS/*"/>
<exclude name="org/jfree/chart/xml/**"/>
</fileset>
</copy>
<copy todir="${basedir}/distribution/experimental">
<fileset dir="${basedir}/experimental">
<exclude name="**/CVS/*"/>
</fileset>
</copy>
<copy todir="${basedir}/distribution/tests">
<fileset dir="${basedir}/tests">
<exclude name="**/CVS/*"/>
</fileset>
</copy>
<copy todir="${basedir}/distribution/swt">
<fileset dir="${basedir}/swt">
<exclude name="**/CVS/*"/>
</fileset>
</copy>
<copy todir="${basedir}/distribution/docfiles">
<fileset dir="${basedir}/docfiles">
</fileset>
</copy>
<!-- copy across lib files -->
<copy file="${jcommon.jar}" tofile="${basedir}/distribution/lib/${jcommon.name}-${jcommon.version}.jar" />
<copy file="${basedir}/lib/swtgraphics2d.jar" tofile="${basedir}/distribution/lib/swtgraphics2d.jar" failonerror="false" />
<copy file="${basedir}/lib/jfreechart-${jfreechart.version}-swt.jar" tofile="${basedir}/distribution/lib/${jfreechart.name}-${jfreechart.version}-swt.jar" failonerror="false" />
<copy file="${servlet.jar}" tofile="${basedir}/distribution/lib/servlet.jar" />
<copy file="${junit.jar}" tofile="${basedir}/distribution/lib/junit-4.11.jar" />
<copy file="${hamcrest.jar}" tofile="${basedir}/distribution/lib/hamcrest-core-1.3.jar" />
<copy file="${basedir}/lib/${jfreesvg.name}-${jfreesvg.version}.jar" tofile="${basedir}/distribution/lib/${jfreesvg.name}-${jfreesvg.version}.jar" />
<copy file="${basedir}/lib/${orsonpdf.name}-${orsonpdf.version}.jar" tofile="${basedir}/distribution/lib/${orsonpdf.name}-${orsonpdf.version}.jar" />
<copy file="${basedir}/lib/orsoncharts-${orsoncharts.version}.jar" tofile="${basedir}/distribution/lib/orsoncharts-${orsoncharts.version}.jar" failonerror="false" />
<!-- copy across ant build files -->
<copy file="${basedir}/ant/build.xml" tofile="${basedir}/distribution/ant/build.xml" />
<copy file="${basedir}/ant/build-swt.xml" tofile="${basedir}/distribution/ant/build-swt.xml" />
<!-- copy across checkstyle property file -->
<copy todir="${basedir}/distribution/checkstyle">
<fileset dir="${basedir}/checkstyle" />
</copy>
<!-- convert end-of-line characters in text files -->
<fixcrlf srcdir="${basedir}/distribution/source"
eol="crlf" eof="remove"
excludes="**/*.jpg" />
<fixcrlf srcdir="${basedir}/distribution/experimental"
eol="lf" eof="remove"
excludes="**/*.jpg" />
<fixcrlf srcdir="${basedir}/distribution/swt"
eol="lf" eof="remove"
excludes="**/*.jpg" />
<fixcrlf srcdir="${basedir}/distribution/tests"
eol="lf" eof="remove"
excludes="**/*.jpg" />
</target>
<!-- Make .zip distribution for JFreeChart -->
<target name="zip" depends="fill-distribution">
<!-- make the zip file -->
<zip zipfile="${basedir}/${jfreechart.name}-${jfreechart.version}.zip">
<zipfileset dir="${basedir}/distribution"
prefix="${jfreechart.name}-${jfreechart.version}" />
</zip>
</target>
<!-- Make .tar.gz distribution for JFreeChart -->
<target name="targz" depends="fill-distribution">
<!-- make the tar.gz file -->
<tar tarfile="${basedir}/${jfreechart.name}-${jfreechart.version}.tar">
<tarfileset dir="${basedir}/distribution"
prefix="${jfreechart.name}-${jfreechart.version}" />
</tar>
<gzip zipfile="${basedir}/${jfreechart.name}-${jfreechart.version}.tar.gz"
src="${basedir}/${jfreechart.name}-${jfreechart.version}.tar" />
<delete file="${basedir}/${jfreechart.name}-${jfreechart.version}.tar" />
</target>
<target name="maven-bundle" depends="zip" >
<!-- make a temporary distribution directory -->
<mkdir dir="distribution"/>
<!-- copy across LICENCE -->
<copy file="licence-LGPL.txt" tofile="distribution/LICENSE.txt"/>
<filterchain id="version.filters">
<replacetokens>
<token key="VERSION" value="${jfreechart.version}"/>
<token key="JCOMMON.VERSION" value="${jcommon.version}"/>
</replacetokens>
</filterchain>
<copy file="pom.xml" tofile="distribution/pom.xml">
<filterchain refid="version.filters"/>
</copy>
<!-- copy across runtime jar file -->
<copy file="lib/${jfreechart.name}-${jfreechart.version}.jar" tofile="distribution/${jfreechart.name}-${jfreechart.version}.jar"/>
<!-- make the jar -->
<jar jarfile="${jfreechart-bundle-file}" basedir="distribution"/>
<!-- delete the temporary distribution directory -->
<delete dir="distribution"/>
</target>
<!-- COMPILE THE JUNIT TESTS. -->
<target name="compile-tests"
depends="compile,compile-experimental"
description="Compile the test code">
<mkdir dir="${basedir}/build-tests"/>
<javac srcdir="${basedir}/tests"
destdir="${basedir}/build-tests"
source="1.6"
target="1.6"
debug="true"
deprecation="false"
optimize="false">
<classpath>
<path refid="build.classpath"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${hamcrest.jar}"/>
<pathelement location="${basedir}/lib/${jfreechart.name}-${jfreechart.version}.jar"/>
<pathelement location="${basedir}/lib/${jfreechart.name}-${jfreechart.version}-experimental.jar"/>
<pathelement location="${basedir}/build-tests"/>
</classpath>
</javac>
</target>
<!-- RUN THE JUNIT TESTS. -->
<target name="test"
depends="compile-tests"
description="Run the test cases">
<mkdir dir="${basedir}/build-tests-reports"/>
<junit printSummary="yes"
haltonerror="false"
haltonfailure="false"
fork="false"
dir=".">
<sysproperty key="basedir" value="."/>
<formatter type="plain" usefile="false"/>
<classpath>
<path refid="build.classpath"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${hamcrest.jar}"/>
<pathelement location="${basedir}/lib/${jfreechart.name}-${jfreechart.version}.jar"/>
<pathelement location="${basedir}/lib/${jfreechart.name}-${jfreechart.version}-experimental.jar"/>
<pathelement location="${basedir}/build-tests"/>
</classpath>
<batchtest todir="${basedir}/build-tests-reports">
<fileset dir="${basedir}/tests">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- ALL -->
<target name="all"
depends="compile,compile-experimental,zip-javadocs,zip,targz,maven-bundle"
description="Compiles JFreeChart, builds the jar files, generates the Javadoc HTML pages and creates distribution files (.zip and .tar.gz).">
<!-- delete the temporary distribution directory -->
<delete dir="${basedir}/distribution" />
</target>
</project>