/[debian]/libglazedlists-java/trunk/build.xml
ViewVC logotype

Annotation of /libglazedlists-java/trunk/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1547 - (hide annotations)
Mon Jan 26 16:37:14 2009 UTC (12 years, 6 months ago) by gregoa
File MIME type: text/xml
File size: 54725 byte(s)
New upstream release.
1 gregoa 1547 <!--
2     Glazed Lists
3     Copyright 2003 publicobject.com, O'Dell Engineering Ltd.
4     -->
5    
6     <project name="glazedlists" default="jar" basedir=".">
7    
8     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9     BUILD ADMINISTRATION
10     Create build directories and set up necessary paths.
11     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
12    
13     <property name="java.target.version" value="1.5"/>
14     <property name="java.target.version.fileFriendlyName" value="java15"/>
15    
16     <!-- filter for maven pom.xml -->
17     <filter token="glazedlists.version" value="${version}"/>
18     <filter token="glazedlists.artifactId" value="glazedlists_${java.target.version.fileFriendlyName}"/>
19    
20     <property environment="env"/>
21     <tstamp prefix="datestamp">
22     <format property="dateAndTime" pattern="yyyy-MM-dd H:mm"/>
23     </tstamp>
24    
25     <!-- Version number for the next planned release -->
26     <property name="next.release.version" value="1.8"/>
27    
28     <!-- Default implementation version for jar file, overridden by release target -->
29     <property name="implementation.version" value="${next.release.version}.alpha${datestamp.DSTAMP}"/>
30    
31     <!-- Default OSGI Bundle version for jar file, overridden by release target -->
32     <property name="bundle.version" value="${implementation.version}"/>
33    
34     <!-- Default title for javadocs, overridden by release target -->
35     <property name="doctitle" value="Glazed Lists"/>
36    
37     <!-- Default name for distribution zip file, overridden by release target -->
38     <property name="dist.file" value="glazedlists-source_${java.target.version.fileFriendlyName}.zip"/>
39    
40     <!-- Release name for distribution zip file -->
41     <property name="release.dist.file" value="glazedlists-${version}-source_${java.target.version.fileFriendlyName}.zip"/>
42    
43     <!-- Default name for jar file, overridden by release target -->
44     <property name="jar.file" value="glazedlists_${java.target.version.fileFriendlyName}.jar"/>
45    
46     <!-- Release name for jar file -->
47     <property name="release.jar.file" value="glazedlists-${version}_${java.target.version.fileFriendlyName}.jar"/>
48    
49     <!-- base output directory for build artefacts -->
50     <property name="target.dir" value="target"/>
51    
52     <!-- output directory for compiled classes -->
53     <property name="classes.dir" value="${target.dir}/classes"/>
54    
55     <!-- output directory for compiled test classes -->
56     <property name="testclasses.dir" value="${target.dir}/test-classes"/>
57    
58     <!-- output directory for japex reports -->
59     <property name="reports.dir" value="${target.dir}/reports"/>
60    
61     <!-- output directory for javadocs -->
62     <property name="docs.dir" value="${target.dir}/docs"/>
63    
64     <!-- output directory for demo jar contents -->
65     <property name="issuesbrowserjar.dir" value="${target.dir}/issuesbrowserjar"/>
66     <property name="xmlbrowser.dir" value="${target.dir}/xmlbrowserjar"/>
67    
68     <!-- output directory for java 1.4 build -->
69     <property name="java14_glazedlists.dir" value="${target.dir}/java14_glazedlists"/>
70    
71     <!-- output directory for maven upload bundle -->
72     <property name="maven_bundle.dir" value="${target.dir}/maven_bundle"/>
73    
74     <!-- name of maven upload bundle -->
75     <property name="maven_bundle.file" value="glazedlists_${java.target.version.fileFriendlyName}-${version}-bundle.jar"/>
76    
77     <patternset id="test.files">
78     <include name="**/*.xml"/>
79     </patternset>
80    
81     <!-- determine the platform swt jar file name and download path from java.net -->
82     <condition property="swt.jar.path" value="https://glazedlists.dev.java.net/files/documents/1073/64389/">
83     <os family="windows"/>
84     </condition>
85     <condition property="swt.jar.file" value="org.eclipse.swt.win32.win32.x86.jar">
86     <os family="windows"/>
87     </condition>
88    
89     <condition property="swt.jar.path" value="https://glazedlists.dev.java.net/files/documents/1073/64390/">
90     <os family="mac"/>
91     </condition>
92     <condition property="swt.jar.file" value="org.eclipse.swt.carbon.macosx.jar">
93     <os family="mac"/>
94     </condition>
95    
96     <condition property="swt.jar.path" value="https://glazedlists.dev.java.net/files/documents/1073/64627/">
97     <os name="Linux"/>
98     </condition>
99     <condition property="swt.jar.file" value="org.eclipse.swt.gtk.linux.x86.jar">
100     <os name="Linux"/>
101     </condition>
102    
103     <!-- use windows files as default if nothing matches -->
104     <property name="swt.jar.path" value="https://glazedlists.dev.java.net/files/documents/1073/64389/"/>
105     <property name="swt.jar.file" value="org.eclipse.swt.win32.win32.x86.jar"/>
106    
107     <target name="clean"
108     description="Clean up generated files, forcing them to be rebuilt.">
109    
110     <!-- Delete target directory with all generated build artifacts -->
111     <delete dir="${target.dir}"/>
112    
113     <delete>
114     <fileset dir="${basedir}" defaultexcludes="no">
115     <!-- Delete temporary files from JEdit -->
116     <include name="**/*~"/>
117     </fileset>
118     </delete>
119     </target>
120    
121    
122     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
123     JAVADOC
124     Construct a browsable API.
125     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
126    
127     <target name="docs"
128     description="Scan the source code to generate the Javadoc API.">
129     <!-- document all the source -->
130     <mkdir dir="${docs.dir}"/>
131     <javadoc
132     destdir="${docs.dir}/api" author="true" use="true" windowtitle="Glazed Lists" source="${java.target.version}">
133     <packageset dir="source"><exclude name="**/impl/**"/><exclude name="**/migrationkit/**"/></packageset>
134     <packageset dir="extensions/calculation/source"><exclude name="**/impl/**"/></packageset>
135     <packageset dir="extensions/swt/source"><exclude name="**/impl/**"/><exclude name="**/migrationkit/**"/></packageset>
136     <packageset dir="extensions/ktable/source"><exclude name="**/impl/**"/></packageset>
137     <packageset dir="extensions/jgoodiesforms/source"><exclude name="**/impl/**"/></packageset>
138     <packageset dir="extensions/nachocalendar/source"><exclude name="**/impl/**"/></packageset>
139     <packageset dir="extensions/jfreechart/source"><exclude name="**/impl/**"/></packageset>
140     <packageset dir="extensions/swinglabs/source"><exclude name="**/impl/**"/></packageset>
141     <packageset dir="extensions/hibernate/source"><exclude name="**/impl/**"/></packageset>
142     <packageset dir="extensions/treetable/source"><exclude name="**/impl/**"/></packageset>
143     <classpath><fileset dir="extensions/" includes="**/lib/*.jar"/></classpath>
144     <link href="http://java.sun.com/j2se/${java.target.version}/docs/api/"/>
145     <link href="http://help.eclipse.org/help33/nftopic/org.eclipse.platform.doc.isv/reference/api/"/>
146     <link href="http://www.jdocs.com/formlayout/1.0.4/api/" packagelistloc="extensions/jgoodiesforms/lib"/>
147     <link href="http://nachocalendar.sourceforge.net/doc/"/>
148     <link href="http://www.jfree.org/jfreechart/api/javadoc/"/>
149     <link href="http://download.java.net/javadesktop/swinglabs/releases/0.8/docs/api/"/>
150     <link href="http://www.hibernate.org/hib_docs/v3/api/"/>
151     <doctitle><![CDATA[<h1>${doctitle}</h1>]]></doctitle>
152     <bottom><![CDATA[<a href="http://publicobject.com/glazedlists/" target="_top">Glazed Lists</a>, Copyright &#169; 2003 publicobject.com, O'Dell Engineering.<br>Documentation build by ${user.name} at ${datestamp.dateAndTime}]]></bottom>
153     </javadoc>
154     </target>
155    
156    
157     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
158     JAR
159     Construct the .jar file for use in a library.
160     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
161    
162     <target name="jar" depends="compileall"
163     description="Creates glazedlists jar file (which is also a valid OSGi bundle) containing all UI libraries.">
164    
165     <mkdir dir="tools"/>
166     <!--download the BND library for creating entries in the manifest.mf file which make it a compliant OSGi bundle. See http://www.osgi.org/ -->
167     <java classname="ca.odell.glazedlists.impl.HttpClient">
168     <classpath path="${classes.dir}"/>
169     <arg value="https://glazedlists.dev.java.net/files/documents/1073/110958/bnd.jar"/>
170     <arg value="tools/bnd.jar"/>
171     </java>
172    
173     <!-- prepare the bnd task which generates OSGi bundle JARs -->
174     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="tools/bnd.jar"/>
175    
176     <!-- create a normal jar file -->
177     <jar destfile="${target.dir}/${jar.file}" update="true" index="true">
178     <fileset dir="${classes.dir}">
179     <exclude name="com/publicobject/**"/> <!-- IssuesBrowser -->
180     </fileset>
181     <fileset dir=".">
182     <include name="resources/**"/>
183     </fileset>
184     </jar>
185    
186     <!-- use the BND tool to generate an OSGi jar from scratch, using the original JAR file as input -->
187     <bnd classpath="${target.dir}/${jar.file}" output="${target.dir}/${jar.file}.osgi" exceptions="true" files="glazedlists.bnd"/>
188    
189     <!-- delete the original jar file -->
190     <delete file="${target.dir}/${jar.file}"/>
191    
192     <!-- rename the OSGi Bundle to the orignal jar file's name -->
193     <move file="${target.dir}/${jar.file}.osgi" toFile="${target.dir}/${jar.file}"/>
194     </target>
195    
196     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
197     COMPILE
198     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
199    
200     <target name="compile" depends="swing"
201     description="Compile the default components of the source.">
202     </target>
203    
204     <target name="compileall" depends="core,migrationkit,swing,io,calculation,swt,ktable,issuesbrowser,swinglabs,hibernate,icu4j"
205     description="Compile all components of the source.">
206     </target>
207    
208     <target name="core">
209     <mkdir dir="${classes.dir}"/>
210     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
211     <!-- swing -->
212     <exclude name="**/swing/**"/>
213     <!-- io -->
214     <exclude name="**/ctp/**"/>
215     <exclude name="**/io/**"/>
216     <exclude name="**/nio/**"/>
217     <exclude name="**/pmap/**"/>
218     <exclude name="**/rbp/**"/>
219     </javac>
220     </target>
221    
222     <target name="migrationkit" depends="core">
223     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
224     <include name="**/migrationkit/**"/>
225     </javac>
226     </target>
227    
228     <target name="swing" depends="core">
229     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
230     <include name="**/swing/**"/>
231     <exclude name="**/migrationkit/**"/>
232     </javac>
233     </target>
234    
235     <target name="io" depends="core">
236     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
237     <include name="**/ctp/**"/>
238     <include name="**/io/**"/>
239     <include name="**/nio/**"/>
240     <include name="**/pmap/**"/>
241     <include name="**/rbp/**"/>
242     </javac>
243     </target>
244    
245    
246     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
247     EXTENSIONS
248     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
249    
250     <target name="calculation" depends="swing">
251     <mkdir dir="extensions/calculation/lib"/>
252     <java classname="ca.odell.glazedlists.impl.HttpClient">
253     <classpath path="${classes.dir}"/>
254     <arg value="https://glazedlists.dev.java.net/files/documents/1073/26197/jcommon.jar"/>
255     <arg value="extensions/calculation/lib/jcommon.jar"/>
256     </java>
257     <java classname="ca.odell.glazedlists.impl.HttpClient">
258     <classpath path="${classes.dir}"/>
259     <arg value="https://glazedlists.dev.java.net/files/documents/1073/26198/jfreechart.jar"/>
260     <arg value="extensions/calculation/lib/jfreechart.jar"/>
261     </java>
262     <javac destdir="${classes.dir}" srcdir="extensions/calculation/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
263     <classpath>
264     <fileset dir="extensions/calculation/lib/" includes="*.jar"/>
265     </classpath>
266     </javac>
267     </target>
268    
269     <target name="swt" depends="core">
270     <mkdir dir="extensions/swt/lib"/>
271     <java classname="ca.odell.glazedlists.impl.HttpClient">
272     <classpath path="${classes.dir}"/>
273     <arg value="https://glazedlists.dev.java.net/files/documents/1073/64386/org.eclipse.core.commands.jar"/>
274     <arg value="extensions/swt/lib/org.eclipse.core.commands.jar"/>
275     </java>
276     <java classname="ca.odell.glazedlists.impl.HttpClient">
277     <classpath path="${classes.dir}"/>
278     <arg value="https://glazedlists.dev.java.net/files/documents/1073/64387/org.eclipse.equinox.common.jar"/>
279     <arg value="extensions/swt/lib/org.eclipse.equinox.common.jar"/>
280     </java>
281     <java classname="ca.odell.glazedlists.impl.HttpClient">
282     <classpath path="${classes.dir}"/>
283     <arg value="https://glazedlists.dev.java.net/files/documents/1073/64388/org.eclipse.jface.jar"/>
284     <arg value="extensions/swt/lib/org.eclipse.jface.jar"/>
285     </java>
286     <java classname="ca.odell.glazedlists.impl.HttpClient">
287     <classpath path="${classes.dir}"/>
288     <arg value="${swt.jar.path}${swt.jar.file}"/>
289     <arg value="extensions/swt/lib/${swt.jar.file}"/>
290     </java>
291     <javac destdir="${classes.dir}" srcdir="extensions/swt/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
292     <classpath>
293     <fileset dir="extensions/swt/lib/" includes="*.jar"/>
294     </classpath>
295     </javac>
296     </target>
297    
298     <target name="ktable" depends="core,swt,issuesbrowser">
299     <mkdir dir="extensions/ktable/lib"/>
300     <java classname="ca.odell.glazedlists.impl.HttpClient">
301     <classpath path="${classes.dir}"/>
302     <arg value="https://glazedlists.dev.java.net/files/documents/1073/24419/ktable.jar"/>
303     <arg value="extensions/ktable/lib/ktable.jar"/>
304     </java>
305     <javac destdir="${classes.dir}" srcdir="extensions/ktable/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
306     <classpath>
307     <fileset dir="extensions/ktable/lib/" includes="*.jar"/>
308     <fileset dir="extensions/swt/lib/" includes="*.jar"/>
309     </classpath>
310     </javac>
311     </target>
312    
313     <target name="jgoodiesforms" depends="swing">
314     <mkdir dir="extensions/jgoodiesforms/lib"/>
315     <java classname="ca.odell.glazedlists.impl.HttpClient">
316     <classpath path="${classes.dir}"/>
317     <arg value="https://glazedlists.dev.java.net/files/documents/1073/27334/forms.jar"/>
318     <arg value="extensions/jgoodiesforms/lib/forms.jar"/>
319     </java>
320     <javac destdir="${classes.dir}" srcdir="extensions/jgoodiesforms/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
321     <classpath>
322     <fileset dir="extensions/jgoodiesforms/lib/" includes="*.jar"/>
323     </classpath>
324     </javac>
325     </target>
326    
327     <target name="swinglabs" depends="swing, issuesbrowser">
328     <!-- the swinglabs .jar is Java 1.5+ only, so we do not bother to run
329     this code through our Java 1.5 to Java 1.4 source code translator -->
330     <mkdir dir="extensions/swinglabs/lib"/>
331     <java classname="ca.odell.glazedlists.impl.HttpClient">
332     <classpath path="${classes.dir}"/>
333     <arg value="https://glazedlists.dev.java.net/files/documents/1073/92328/swingx.jar"/>
334     <arg value="extensions/swinglabs/lib/swingx.jar"/>
335     </java>
336     <javac destdir="${classes.dir}" srcdir="extensions/swinglabs/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
337     <classpath>
338     <fileset dir="extensions/swinglabs/lib/" includes="*.jar"/>
339     </classpath>
340     </javac>
341     </target>
342    
343     <target name="icu4j" depends="swing">
344     <mkdir dir="extensions/icu4j/lib"/>
345     <java classname="ca.odell.glazedlists.impl.HttpClient">
346     <classpath path="${classes.dir}"/>
347     <arg value="https://glazedlists.dev.java.net/files/documents/1073/41904/icu4j.jar"/>
348     <arg value="extensions/icu4j/lib/icu4j.jar"/>
349     </java>
350     <javac destdir="${classes.dir}" srcdir="extensions/icu4j/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
351     <classpath>
352     <fileset dir="extensions/icu4j/lib/" includes="*.jar"/>
353     </classpath>
354     </javac>
355     </target>
356    
357     <target name="nachocalendar" depends="swing">
358     <mkdir dir="extensions/nachocalendar/lib"/>
359     <java classname="ca.odell.glazedlists.impl.HttpClient">
360     <classpath path="${classes.dir}"/>
361     <arg value="https://glazedlists.dev.java.net/files/documents/1073/29958/nachocalendar.jar"/>
362     <arg value="extensions/nachocalendar/lib/nachocalendar.jar"/>
363     </java>
364     <javac destdir="${classes.dir}" srcdir="extensions/nachocalendar/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
365     <classpath>
366     <fileset dir="extensions/nachocalendar/lib/" includes="*.jar"/>
367     </classpath>
368     </javac>
369     </target>
370    
371     <target name="treetable" depends="swing">
372     <javac destdir="${classes.dir}" srcdir="extensions/treetable/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off"/>
373     </target>
374    
375     <target name="jfreechart" depends="swing">
376     <mkdir dir="extensions/jfreechart/lib"/>
377     <java classname="ca.odell.glazedlists.impl.HttpClient">
378     <classpath path="${classes.dir}"/>
379     <arg value="https://glazedlists.dev.java.net/files/documents/1073/26197/jcommon.jar"/>
380     <arg value="extensions/jfreechart/lib/jcommon.jar"/>
381     </java>
382     <java classname="ca.odell.glazedlists.impl.HttpClient">
383     <classpath path="${classes.dir}"/>
384     <arg value="https://glazedlists.dev.java.net/files/documents/1073/26198/jfreechart.jar"/>
385     <arg value="extensions/jfreechart/lib/jfreechart.jar"/>
386     </java>
387     <javac destdir="${classes.dir}" srcdir="extensions/jfreechart/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
388     <classpath>
389     <fileset dir="extensions/jfreechart/lib/" includes="*.jar"/>
390     </classpath>
391     </javac>
392     </target>
393    
394     <target name="hibernate" depends="core">
395     <mkdir dir="extensions/hibernate/lib"/>
396     <java classname="ca.odell.glazedlists.impl.HttpClient">
397     <classpath path="${classes.dir}"/>
398     <arg value="https://glazedlists.dev.java.net/files/documents/1073/58581/hibernate.jar"/>
399     <arg value="extensions/hibernate/lib/hibernate.jar"/>
400     </java>
401     <java classname="ca.odell.glazedlists.impl.HttpClient">
402     <classpath path="${classes.dir}"/>
403     <arg value="https://glazedlists.dev.java.net/files/documents/1073/58582/hibernate-libs.jar"/>
404     <arg value="extensions/hibernate/lib/hibernate-libs.jar"/>
405     </java>
406     <java classname="ca.odell.glazedlists.impl.HttpClient">
407     <classpath path="${classes.dir}"/>
408     <arg value="https://glazedlists.dev.java.net/files/documents/1073/39276/hsqldb.jar"/>
409     <arg value="extensions/hibernate/lib/hsqldb.jar"/>
410     </java>
411     <javac destdir="${classes.dir}" srcdir="extensions/hibernate/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
412     <classpath>
413     <fileset dir="extensions/hibernate/lib/" includes="*.jar"/>
414     </classpath>
415     </javac>
416     </target>
417    
418     <target name="japex" depends="compile">
419     <!-- download dependencies for japex -->
420     <mkdir dir="extensions/japex/lib"/>
421     <java classname="ca.odell.glazedlists.impl.HttpClient">
422     <classpath path="${classes.dir}"/>
423     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37606/activation.jar"/>
424     <arg value="extensions/japex/lib/activation.jar"/>
425     </java>
426     <java classname="ca.odell.glazedlists.impl.HttpClient">
427     <classpath path="${classes.dir}"/>
428     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37605/japex-all.jar"/>
429     <arg value="extensions/japex/lib/japex-all.jar"/>
430     </java>
431     <java classname="ca.odell.glazedlists.impl.HttpClient">
432     <classpath path="${classes.dir}"/>
433     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37607/mail.jar"/>
434     <arg value="extensions/japex/lib/mail.jar"/>
435     </java>
436     <!-- compile the Japex performance tests -->
437     <javac destdir="${classes.dir}" srcdir="extensions/japex/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
438     <classpath>
439     <fileset dir="extensions/japex/lib/" includes="*.jar"/>
440     </classpath>
441     </javac>
442     <!-- execute the Japex performance tests -->
443     <!--
444     <property name="config" value="extensions/japex/ListEventAssembler-JapexConfig.xml"/>
445     <property name="config" value="extensions/japex/ListEventPublisher-JapexConfig.xml"/>
446     <property name="config" value="extensions/japex/SortedList-JapexConfig.xml"/>
447     -->
448     <property name="config" value="extensions/japex/ThreadProxy-JapexConfig.xml"/>
449     <java dir="." fork="true" classname="com.sun.japex.Japex">
450     <classpath>
451     <fileset dir="extensions/japex/lib/" includes="*.jar"/>
452     </classpath>
453     <sysproperty key="japex.reportsDirectory" value="${reports.dir}"/>
454     <arg line="${config}/"/>
455     </java>
456     </target>
457    
458     <target name="issuesbrowser" depends="core,swing,swt,jfreechart,jgoodiesforms,nachocalendar,treetable">
459     <mkdir dir="extensions/issuesbrowser/lib"/>
460     <java classname="ca.odell.glazedlists.impl.HttpClient">
461     <classpath path="${classes.dir}"/>
462     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37509/http.jar"/>
463     <arg value="extensions/issuesbrowser/lib/http.jar"/>
464     </java>
465     <javac destdir="${classes.dir}" srcdir="extensions/issuesbrowser/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
466     <classpath>
467     <fileset dir="extensions/swt/lib/" includes="*.jar"/>
468     <fileset dir="extensions/jfreechart/lib/" includes="*.jar"/>
469     <fileset dir="extensions/jgoodiesforms/lib/" includes="*.jar"/>
470     <fileset dir="extensions/nachocalendar/lib/" includes="*.jar"/>
471     <fileset dir="extensions/issuesbrowser/lib/" includes="*.jar"/>
472     </classpath>
473     </javac>
474     </target>
475    
476     <!-- check if the user already has BCEL in their ANT \lib directory (which is required to execute the "demojar" target -->
477     <available classname="org.apache.bcel.Constants" property="bcel.present"/>
478    
479     <target name="downloadBCEL" unless="bcel.present">
480     <!-- explain the BCEL requirement -->
481     <echo>To build the demojar, Glazed Lists requires the Byte Code Engineering Library (BCEL) to be available in the \lib directory of your ANT installation. The Glazed Lists build system will now automatically attempt to download the BCEL into ${ant.home}\lib on your behalf.</echo>
482    
483     <!-- wait for the user to read the message before continuing -->
484     <input>Press Return to begin the download...</input>
485    
486     <!-- download bcel.jar to the ant \lib directory -->
487     <java classname="ca.odell.glazedlists.impl.HttpClient">
488     <classpath path="${classes.dir}"/>
489     <arg value="https://glazedlists.dev.java.net/files/documents/1073/42723/bcel.jar"/>
490     <arg value="${ant.home}/lib/bcel.jar"/>
491     </java>
492    
493     <!-- recheck if bcel.jar is now in the ANT \lib directory -->
494     <available classname="org.apache.bcel.Constants" property="bcel.present"/>
495    
496     <!-- check if bcel.jar was downloaded successfully and display the instructions to rerun the ANT command. -->
497     <fail message="BCEL has been successfully downloaded. Please re-execute the ANT task and it will now proceed normally.">
498     <condition>
499     <available file="${ant.home}/lib/bcel.jar"/>
500     </condition>
501     </fail>
502    
503     <!-- otherwise bcel.jar could not be downloaded so fail with instructions on how to resolve the problem manually -->
504     <fail message="The BCEL could not be downloaded. You must manually download it from here: http://jakarta.apache.org/site/downloads/downloads_bcel.cgi and place it in your ANT installation here: ${ant.home}\lib"/>
505     </target>
506    
507     <target name="issuesbrowserjar" depends="clean,issuesbrowser,downloadBCEL"
508     description="Create a .jar file with the Issues Browser demo application.">
509    
510     <!-- make a temporary folder for assembling the demojar -->
511     <mkdir dir="${issuesbrowserjar.dir}"/>
512    
513     <!-- copy the classes into the demojar folder -->
514     <copy todir="${issuesbrowserjar.dir}">
515     <fileset dir="${classes.dir}"/>
516     </copy>
517    
518     <!-- unjar the third-party classes into the demojar folder -->
519     <unjar src="extensions/jfreechart/lib/jcommon.jar" dest="${issuesbrowserjar.dir}"/>
520     <unjar src="extensions/jfreechart/lib/jfreechart.jar" dest="${issuesbrowserjar.dir}"/>
521     <unjar src="extensions/jgoodiesforms/lib/forms.jar" dest="${issuesbrowserjar.dir}"/>
522     <unjar src="extensions/nachocalendar/lib/nachocalendar.jar" dest="${issuesbrowserjar.dir}"/>
523     <unjar src="extensions/issuesbrowser/lib/http.jar" dest="${issuesbrowserjar.dir}"/>
524    
525     <!-- create a *minimal* set of classes required to execute the swing demo -->
526     <classfileset id="issuesBrowserClasses" dir="${issuesbrowserjar.dir}" rootclass="com.publicobject.issuesbrowser.swing.IssuesBrowser"/>
527    
528     <!-- create the actual demo jar -->
529     <jar destfile="${target.dir}/glazedlists-demo.jar" update="true" index="true">
530     <fileset refid="issuesBrowserClasses"/>
531     <fileset dir="${issuesbrowserjar.dir}">
532     <include name="**/LocalizationBundle*.properties"/>
533     <include name="org/jfree/chart/resources/JFreeChartResources.class"/>
534     <include name="org/jfree/resources/JCommonResources.class"/>
535     <include name="net/sf/nachocalendar/language*.properties"/>
536     </fileset>
537     <fileset dir=".">
538     <include name="resources/**"/>
539     </fileset>
540     <fileset dir="extensions/issuesbrowser">
541     <include name="resources/**"/>
542     </fileset>
543     <manifest>
544     <attribute name="Main-Class" value="com.publicobject.issuesbrowser.swing.IssuesBrowser"/>
545     </manifest>
546     </jar>
547     </target>
548    
549     <target name="xmlbrowserjar" depends="clean,issuesbrowser,downloadBCEL"
550     description="Create a .jar file with the Xml Browser demo application.">
551    
552     <!-- make a temporary folder for assembling the demojar -->
553     <mkdir dir="${xmlbrowser.dir}"/>
554    
555     <!-- copy the classes into the xmlbrowser folder -->
556     <copy todir="${xmlbrowser.dir}">
557     <fileset dir="${classes.dir}"/>
558     </copy>
559    
560     <!-- xmlToEventList a *minimal* set of classes required to execute the swing demo -->
561     <classfileset id="xmlBrowserClasses" dir="${xmlbrowser.dir}" rootclass="com.publicobject.xmlbrowser.XmlBrowser"/>
562    
563     <!-- xmlToEventList the actual demo jar -->
564     <jar destfile="${target.dir}/xmlbrowser.jar" update="true" index="true">
565     <fileset refid="xmlBrowserClasses"/>
566     <fileset dir=".">
567     <include name="resources/**"/>
568     <include name="pom.xml"/>
569     </fileset>
570     <manifest>
571     <attribute name="Main-Class" value="com.publicobject.xmlbrowser.XmlBrowser"/>
572     </manifest>
573     </jar>
574     </target>
575    
576    
577     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
578     CREATE JAVA 1.4-COMPATIBLE PROJECT
579     Create a new project folder java14_glazedlists/ that can be used to
580     build and develop Glazed Lists on J2SE 1.4.
581     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
582    
583     <target name="java14" depends="compileall,compiletests" description="Compile Glazed Lists for deployment on a J2SE 1.4">
584     <!-- clean the java14 directory -->
585     <delete dir="${java14_glazedlists.dir}"/>
586    
587     <!-- download the declawer build tool -->
588     <mkdir dir="tools"/>
589     <java classname="ca.odell.glazedlists.impl.HttpClient">
590     <classpath path="${classes.dir}"/>
591     <arg value="https://glazedlists.dev.java.net/files/documents/1073/25249/declawer.jar"/>
592     <arg value="tools/declawer.jar"/>
593     </java>
594    
595     <!-- Declaw source/ -->
596     <mkdir dir="${java14_glazedlists.dir}/source"/>
597     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
598     <arg value="source"/>
599     <arg value="${ant.home}/lib/junit.jar"/>
600     <arg value="${java14_glazedlists.dir}/source"/>
601     </java>
602    
603     <!-- Declaw test/ -->
604     <mkdir dir="${java14_glazedlists.dir}/test"/>
605     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
606     <arg value="test"/>
607     <arg value="${classes.dir}${path.separator}${ant.home}/lib/junit.jar${path.separator}extensions/jgoodiesforms/lib/forms.jar${path.separator}extensions/hibernate/lib/hibernate.jar${path.separator}extensions/swinglabs/lib/swingx.jar${path.separator}extensions/swt/lib/org.eclipse.core.commands.jar${path.separator}extensions/swt/lib/org.eclipse.jface.jar${path.separator}extensions/swt/lib/${swt.jar.file}${path.separator}extensions/jfreechart/lib/jcommon.jar${path.separator}extensions/jfreechart/lib/jfreechart.jar"/>
608     <arg value="${java14_glazedlists.dir}/test"/>
609     </java>
610    
611     <!-- Declaw swt/ -->
612     <mkdir dir="${java14_glazedlists.dir}/extensions/swt/source"/>
613     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
614     <arg value="extensions/swt/source"/>
615     <arg value="${classes.dir}${path.separator}extensions/swt/lib/org.eclipse.core.commands.jar${path.separator}extensions/swt/lib/org.eclipse.jface.jar${path.separator}extensions/swt/lib/${swt.jar.file}"/>
616     <arg value="${java14_glazedlists.dir}/extensions/swt/source"/>
617     </java>
618    
619     <!-- Declaw calculation/ -->
620     <mkdir dir="${java14_glazedlists.dir}/extensions/calculation/source"/>
621     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
622     <arg value="extensions/calculation/source"/>
623     <arg value="${classes.dir}${path.separator}extensions/calculation/lib/jcommon.jar${path.separator}extensions/calculation/lib/jfreechart.jar"/>
624     <arg value="${java14_glazedlists.dir}/extensions/calculation/source"/>
625     </java>
626    
627     <!-- Declaw jfreechart/ -->
628     <mkdir dir="${java14_glazedlists.dir}/extensions/jfreechart/source"/>
629     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
630     <arg value="extensions/jfreechart/source"/>
631     <arg value="${classes.dir}${path.separator}extensions/jfreechart/lib/jcommon.jar${path.separator}extensions/jfreechart/lib/jfreechart.jar"/>
632     <arg value="${java14_glazedlists.dir}/extensions/jfreechart/source"/>
633     </java>
634    
635     <!-- Declaw nachocalendar/ -->
636     <mkdir dir="${java14_glazedlists.dir}/extensions/nachocalendar/source"/>
637     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
638     <arg value="extensions/nachocalendar/source"/>
639     <arg value="${classes.dir}${path.separator}extensions/nachocalendar/lib/nachocalendar.jar"/>
640     <arg value="${java14_glazedlists.dir}/extensions/nachocalendar/source"/>
641     </java>
642    
643     <!-- Declaw jgoodiesforms/ -->
644     <mkdir dir="${java14_glazedlists.dir}/extensions/jgoodiesforms/source"/>
645     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
646     <arg value="extensions/jgoodiesforms/source"/>
647     <arg value="${classes.dir}${path.separator}extensions/jgoodiesforms/lib/forms.jar"/>
648     <arg value="${java14_glazedlists.dir}/extensions/jgoodiesforms/source"/>
649     </java>
650    
651     <!-- Declaw treetable/ -->
652     <mkdir dir="${java14_glazedlists.dir}/extensions/treetable/source"/>
653     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
654     <arg value="extensions/treetable/source"/>
655     <arg value="${classes.dir}"/>
656     <arg value="${java14_glazedlists.dir}/extensions/treetable/source"/>
657     </java>
658    
659     <!-- Declaw hibernate/ -->
660     <mkdir dir="${java14_glazedlists.dir}/extensions/hibernate/source"/>
661     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
662     <arg value="extensions/hibernate/source"/>
663     <arg value="${classes.dir}${path.separator}extensions/hibernate/lib/hibernate.jar"/>
664     <arg value="${java14_glazedlists.dir}/extensions/hibernate/source"/>
665     </java>
666    
667     <!-- Declaw icu4j/ -->
668     <mkdir dir="${java14_glazedlists.dir}/extensions/icu4j/source"/>
669     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
670     <arg value="extensions/icu4j/source"/>
671     <arg value="${classes.dir}${path.separator}extensions/icu4j/lib/icu4j.jar"/>
672     <arg value="${java14_glazedlists.dir}/extensions/icu4j/source"/>
673     </java>
674    
675     <!-- do not declaw swinglabs: swingx is only supported on Java >= 1.5
676     <mkdir dir="${java14_glazedlists.dir}/extensions/swinglabs/source"/>
677     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
678     <arg value="extensions/swinglabs/source"/>
679     <arg value="${classes.dir}${path.separator}extensions/swinglabs/lib/swingx.jar"/>
680     <arg value="${java14_glazedlists.dir}/extensions/swinglabs/source"/>
681     </java>
682     -->
683     <!-- Declaw issuesbrowser/ -->
684     <mkdir dir="${java14_glazedlists.dir}/extensions/issuesbrowser/source"/>
685     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
686     <arg value="extensions/issuesbrowser/source"/>
687     <arg value="${classes.dir}${path.separator}extensions/swt/lib/org.eclipse.core.commands.jar${path.separator}extensions/swt/lib/org.eclipse.jface.jar${path.separator}extensions/swt/lib/${swt.jar.file}${path.separator}extensions/jfreechart/lib/jcommon.jar${path.separator}extensions/jfreechart/lib/jfreechart.jar${path.separator}extensions/jgoodiesforms/lib/forms.jar${path.separator}extensions/nachocalendar/lib/nachocalendar.jar${path.separator}extensions/issuesbrowser/lib/http.jar"/>
688     <arg value="${java14_glazedlists.dir}/extensions/issuesbrowser/source"/>
689     </java>
690    
691     <!-- Copy all of the resources (non-source files) to the java14 directory. -->
692     <copy todir="${java14_glazedlists.dir}">
693     <fileset dir=".">
694     <exclude name="${target.dir}/**"/>
695     <exclude name="**/*.java"/>
696     <exclude name="**/*.class"/>
697     </fileset>
698     </copy>
699    
700     <!-- Alter the target platform in the java14 build.xml file from 1.5 to 1.4. -->
701     <replace file="${java14_glazedlists.dir}/build.xml" token="&lt;property name=&quot;java.target.version&quot; value=&quot;1.5&quot;/&gt;" value="&lt;property name=&quot;java.target.version&quot; value=&quot;1.4&quot;/&gt;"/>
702     <replace file="${java14_glazedlists.dir}/build.xml" token="&lt;property name=&quot;java.target.version.fileFriendlyName&quot; value=&quot;java15&quot;/&gt;" value="&lt;property name=&quot;java.target.version.fileFriendlyName&quot; value=&quot;java14&quot;/&gt;"/>
703     </target>
704    
705    
706     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
707     REDISTRIBUTING THE SOURCE
708     Package the entire Glazed Lists source tree in a .zip file.
709     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
710    
711     <target name="dist" depends="clean"
712     description="Create a .zip file of the source for backup or distribution.">
713     <mkdir dir="${target.dir}"/>
714     <zip destfile="${target.dir}/${dist.file}" basedir=".">
715     <exclude name="${target.dir}/**"/>
716     <exclude name="tools/**"/>
717     <exclude name="extensions/**/lib/**"/>
718     <exclude name="www/**"/>
719     <exclude name="*.iml"/> <!-- Intellij IDEA Module File -->
720     <exclude name="*.ipr"/> <!-- Intellij IDEA Project File -->
721     <exclude name="*.iws"/> <!-- Intellij IDEA Workspace File -->
722     <exclude name="*.tfpt"/> <!-- Performance Test Data (mozillabugs.tfpt, mp3collection.tfpt) -->
723     <exclude name=".project"/> <!-- Eclipse project file -->
724     <exclude name=".classpath"/> <!-- Eclipse project classpath -->
725     <exclude name=".settings/**"/> <!-- Eclipse project settings -->
726     </zip>
727     </target>
728    
729     <target name="upload" depends="dist,jar,compiletests"
730     description="Upload binaries to java.net, see http://javanettasks.dev.java.net/">
731    
732     <!-- download the javanettasks library for uploading jars to the java.net webserver -->
733     <mkdir dir="tools"/>
734     <java classname="ca.odell.glazedlists.impl.HttpClient">
735     <classpath path="${classes.dir}"/>
736     <arg value="https://glazedlists.dev.java.net/files/documents/1073/25945/javanettasks.jar"/>
737     <arg value="tools/javanettasks.jar"/>
738     </java>
739    
740     <!-- prepare the javaNetUpload task -->
741     <taskdef resource="org/kohsuke/javanettasks.properties" classpath="tools/javanettasks.jar"/>
742    
743     <!-- upload source -->
744     <javaNetUpload projectName="glazedlists"
745     toFile="/latest_build/${dist.file}"
746     fromFile="${target.dir}/${dist.file}"
747     fileDescription="Source build by ${user.name} at ${datestamp.dateAndTime}"
748     overwrite="yes"
749     fileStatus="Draft"/>
750    
751     <!-- upload binary -->
752     <javaNetUpload projectName="glazedlists"
753     toFile="/latest_build/${jar.file}"
754     fromFile="${target.dir}/${jar.file}"
755     fileDescription="Binary build by ${user.name} at ${datestamp.dateAndTime}"
756     overwrite="yes"
757     fileStatus="Draft"/>
758     </target>
759    
760    
761     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
762     TEST
763     Compile unit tests and run them using JUnit.
764     This task depends on JUnit, available free at http://www.junit.org
765     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
766    
767     <target name="test" depends="compiletests"
768     description="Compile unit tests and run them using JUnit.">
769     <!-- Execute JUnit tests -->
770     <junit printsummary="true" showoutput="false" fork="true"
771     errorProperty="test.failed" failureProperty="test.failed">
772     <assertions>
773     <enable/>
774     </assertions>
775     <classpath>
776     <pathelement location="${classes.dir}"/>
777     <pathelement location="${testclasses.dir}"/>
778     <fileset dir="extensions" includes="**/*.jar"/>
779     <fileset file="${ant.home}/lib/junit.jar"/>
780     <pathelement location="extensions/hibernate/etc"/>
781     </classpath>
782     <formatter type="brief" usefile="false"/>
783     <batchtest>
784     <fileset dir="${testclasses.dir}" includes="**/**Test.class"/>
785     </batchtest>
786     </junit>
787     <fail message="Tests failed. Check test output." if="test.failed"/>
788     </target>
789    
790     <target name="compiletests" depends="compileall">
791     <!-- Verify that JUnit is available on the classpath -->
792     <available classname="junit.framework.TestCase" property="junit.present"/>
793     <fail unless="junit.present" message="To run this task, install junit.jar and optional.jar into ${ant.home}/lib/ JUnit is available free at http://www.junit.org"/>
794     <mkdir dir="${testclasses.dir}"/>
795     <javac destdir="${testclasses.dir}" srcdir="test" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="off">
796     <classpath>
797     <pathelement location="${classes.dir}"/>
798     <fileset dir="extensions" includes="**/*.jar"/>
799     <fileset file="${ant.home}/lib/junit.jar"/>
800     </classpath>
801     </javac>
802    
803     <!-- Copy over the mapping files -->
804     <copy todir="${testclasses.dir}">
805     <fileset dir="test">
806     <patternset refid="test.files"/>
807     </fileset>
808     </copy>
809     </target>
810    
811     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
812     MAVEN-BUNDLE
813     Construct the maven upload bundle.
814     It contains the POM, the main artifact, source and javadoc jar
815     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
816     <target name="maven-bundle" depends="jar-sources,jar-javadoc,jar"
817     description="Creates glazedlists upload bundle for maven repository.">
818     <copy file="pom.xml" todir="${maven_bundle.dir}" filtering="true"/>
819     <copy file="${target.dir}/${jar.file}" tofile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}.jar"/>
820     <jar destfile="${target.dir}/${maven_bundle.file}">
821     <fileset dir="${maven_bundle.dir}">
822     <include name="pom.xml"/>
823     <include name="glazedlists_${java.target.version.fileFriendlyName}-${version}.jar"/>
824     <include name="glazedlists_${java.target.version.fileFriendlyName}-${version}-sources.jar"/>
825     <include name="glazedlists_${java.target.version.fileFriendlyName}-${version}-javadoc.jar"/>
826     </fileset>
827     </jar>
828     <delete dir="${maven_bundle.dir}"/>
829     </target>
830    
831     <target name="check-version" description="Checks version property">
832     <fail unless="version" message="To build a maven upload bundle the property 'version' must be defined."/>
833     </target>
834    
835     <target name="jar-sources" depends="check-version,dist"
836     description="Create a .jar file containing the source files.">
837     <mkdir dir="${maven_bundle.dir}"/>
838     <copy file="${target.dir}/${dist.file}" tofile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}-sources.jar"/>
839     <jar destfile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}-sources.jar" update="true"/>
840     </target>
841    
842     <target name="jar-javadoc" depends="check-version,docs"
843     description="Create a .jar file containing the javadoc.">
844     <mkdir dir="${maven_bundle.dir}"/>
845     <jar destfile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}-javadoc.jar" basedir="${docs.dir}/api"/>
846     </target>
847    
848     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
849     RELEASE
850     Build a Glazed Lists release with version number.
851     It builds source distribution, binary jar and maven upload bundle with correct file names.
852     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
853    
854     <target name="check-release-version" description="Checks version property">
855     <fail unless="version" message="To build or upload a release the property 'version' must be defined."/>
856     </target>
857    
858     <target name="release" depends="check-release-version"
859     description="Builds a release with binary jar, source distribution and maven upload bundle">
860     <antcall target="maven-bundle">
861     <param name="doctitle" value="Glazed Lists ${version}"/>
862     <param name="implementation.version" value="${version}"/>
863     <param name="bundle.version" value="${version}"/>
864     <param name="jar.file" value="${release.jar.file}"/>
865     <param name="dist.file" value="${release.dist.file}"/>
866     </antcall>
867     <echo message="${line.separator}Release build completed. Please upload with: 'ant -Dversion=${version} upload-release'"/>
868     <echo message="Remember to increase the value for build property 'next.release.version'"/>
869     </target>
870    
871     <target name="check-release-artifacts">
872     <fail message="Files for release upload are missing, build a release first.">
873     <condition>
874     <or>
875     <not>
876     <available file="${target.dir}/${release.jar.file}" property="jar.file.present"/>
877     </not>
878     <not>
879     <available file="${target.dir}/${release.dist.file}" property="dist.file.present"/>
880     </not>
881     <not>
882     <available file="${target.dir}/${maven_bundle.file}" property="maven_bundle.file.present"/>
883     </not>
884     </or>
885     </condition>
886     </fail>
887     </target>
888    
889     <target name="upload-release" depends="check-release-version, check-release-artifacts"
890     description="Uploads a release to glazedlists.dev.java.net">
891     <!-- download the javanettasks library for uploading jars to the java.net webserver -->
892     <mkdir dir="tools"/>
893     <java classname="ca.odell.glazedlists.impl.HttpClient">
894     <classpath path="${classes.dir}"/>
895     <arg value="https://glazedlists.dev.java.net/files/documents/1073/25945/javanettasks.jar"/>
896     <arg value="tools/javanettasks.jar"/>
897     </java>
898    
899     <!-- prepare the javaNetUpload task -->
900     <taskdef resource="org/kohsuke/javanettasks.properties" classpath="tools/javanettasks.jar"/>
901    
902     <!-- upload source distribution -->
903     <echo message="Uploading to /glazedlists-${version}/${release.dist.file}"/>
904     <javaNetUpload projectName="glazedlists"
905     toFile="/glazedlists-${version}/${release.dist.file}"
906     fromFile="${target.dir}/${release.dist.file}"
907     fileDescription="Source release by ${user.name} at ${datestamp.dateAndTime}"
908     fileStatus="Archival"/>
909    
910     <!-- upload binary jar -->
911     <echo message="Uploading to /glazedlists-${version}/${release.jar.file}"/>
912     <javaNetUpload projectName="glazedlists"
913     toFile="/glazedlists-${version}/${release.jar.file}"
914     fromFile="${target.dir}/${release.jar.file}"
915     fileDescription="Binary release by ${user.name} at ${datestamp.dateAndTime}"
916     fileStatus="Archival"/>
917    
918     <!-- upload maven bundle -->
919     <echo message="Uploading to /maven_upload/${maven_bundle.file}"/>
920     <javaNetUpload projectName="glazedlists"
921     toFile="/maven_upload/${maven_bundle.file}"
922     fromFile="${target.dir}/${maven_bundle.file}"
923     fileDescription="Maven upload bundle by ${user.name} at ${datestamp.dateAndTime}"
924     fileStatus="Archival"/>
925     </target>
926    
927     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
928     M4
929     Run the m4 preprocessor to generate source code, see
930     Unix: http://www.gnu.org/software/m4/
931     Windows; http://gnuwin32.sourceforge.net/packages/m4.htm
932     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
933     <target name="m4">
934     <!-- generate the four color tree -->
935     <mapper id="bcii_to_fourcolorintermediate" type="glob"
936     from="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"
937     to="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java_intermediate"/>
938     <apply executable="m4" parallel="false">
939     <arg line="--prefix-builtins"/>
940     <arg line="-DVAR_COLOUR_COUNT=4"/>
941     <arg line="-DVAR_WIDE_NODES=true"/>
942     <arg line="-DVAR_TYPE_COUNT=1"/>
943     <srcfile/>
944     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"/>
945     <mapper refid="bcii_to_fourcolorintermediate"/>
946     <redirector><outputmapper refid="bcii_to_fourcolorintermediate"/></redirector>
947     </apply>
948    
949     <mapper id="fourcolorintermediate_to_fourcolor" type="glob"
950     from="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java_intermediate"
951     to="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java"/>
952     <apply executable="m4" parallel="false">
953     <arg line="--prefix-builtins"/>
954     <arg line="-DBciiTree=FourColorTree"/>
955     <arg line="-DBciiNode=FourColorNode"/>
956     <arg line="-DBciiTreeAsList=FourColorTreeAsList"/>
957     <arg line="-DBciiTreeIterator=FourColorTreeIterator"/>
958     <arg line="-DCOMMAPLACEHOLDER=,"/>
959     <srcfile/>
960     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java_intermediate"/>
961     <mapper refid="fourcolorintermediate_to_fourcolor"/>
962     <redirector><outputmapper refid="fourcolorintermediate_to_fourcolor"/></redirector>
963     </apply>
964    
965     <!-- generate the four color two value tree -->
966     <mapper id="bcii_to_fourcolortwovalueintermediate" type="glob"
967     from="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"
968     to="source/ca/odell/glazedlists/impl/adt/barcode2/FourColorTwoValue*.java_intermediate"/>
969     <apply executable="m4" parallel="false">
970     <arg line="--prefix-builtins"/>
971     <arg line="-DVAR_COLOUR_COUNT=4"/>
972     <arg line="-DVAR_WIDE_NODES=true"/>
973     <arg line="-DVAR_TYPE_COUNT=2"/>
974     <srcfile/>
975     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"/>
976     <mapper refid="bcii_to_fourcolortwovalueintermediate"/>
977     <redirector><outputmapper refid="bcii_to_fourcolortwovalueintermediate"/></redirector>
978     </apply>
979    
980     <mapper id="fourcolortwovalueintermediate_to_fourcolortwovalue" type="glob"
981     from="source/ca/odell/glazedlists/impl/adt/barcode2/FourColorTwoValue*.java_intermediate"
982     to="source/ca/odell/glazedlists/impl/adt/barcode2/FourColorTwoValue*.java"/>
983     <apply executable="m4" parallel="false">
984     <arg line="--prefix-builtins"/>
985     <arg line="-DBciiTree=FourColorTwoValueTree"/>
986     <arg line="-DBciiNode=FourColorTwoValueNode"/>
987     <arg line="-DBciiTreeAsList=FourColorTwoValueTreeAsList"/>
988     <arg line="-DBciiTreeIterator=FourColorTwoValueTreeIterator"/>
989     <arg line="-DCOMMAPLACEHOLDER=,"/>
990     <srcfile/>
991     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java_intermediate"/>
992     <mapper refid="fourcolortwovalueintermediate_to_fourcolortwovalue"/>
993     <redirector><outputmapper refid="fourcolortwovalueintermediate_to_fourcolortwovalue"/></redirector>
994     </apply>
995    
996     <!-- generate the simple tree -->
997     <mapper id="bcii_to_simpleintermediate" type="glob"
998     from="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"
999     to="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java_intermediate"/>
1000     <apply executable="m4" parallel="false">
1001     <arg line="--prefix-builtins"/>
1002     <arg line="-DVAR_COLOUR_COUNT=1"/>
1003     <arg line="-DVAR_WIDE_NODES=false"/>
1004     <arg line="-DVAR_TYPE_COUNT=1"/>
1005     <srcfile/>
1006     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"/>
1007     <mapper refid="bcii_to_simpleintermediate"/>
1008     <redirector><outputmapper refid="bcii_to_simpleintermediate"/></redirector>
1009     </apply>
1010    
1011     <mapper id="simpleintermediate_to_simple" type="glob"
1012     from="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java_intermediate"
1013     to="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java"/>
1014     <apply executable="m4" parallel="false">
1015     <arg line="--prefix-builtins"/>
1016     <arg line="-DBciiTree=SimpleTree"/>
1017     <arg line="-DBciiNode=SimpleNode"/>
1018     <arg line="-DBciiTreeAsList=SimpleTreeAsList"/>
1019     <arg line="-DBciiTreeIterator=SimpleTreeIterator"/>
1020     <arg line="-DCOMMAPLACEHOLDER=,"/>
1021     <srcfile/>
1022     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java_intermediate"/>
1023     <mapper refid="simpleintermediate_to_simple"/>
1024     <redirector><outputmapper refid="simpleintermediate_to_simple"/></redirector>
1025     </apply>
1026    
1027     <!-- Delete intermediate files -->
1028     <delete>
1029     <fileset dir="${basedir}" defaultexcludes="no">
1030     <include name="source/ca/odell/glazedlists/impl/adt/barcode2/*.java_intermediate"/>
1031     </fileset>
1032     </delete>
1033     </target>
1034    
1035     </project>

  ViewVC Help
Powered by ViewVC 1.1.26