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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 374 - (hide annotations)
Fri Sep 29 20:24:59 2006 UTC (14 years, 10 months ago) by gregoa
File MIME type: text/xml
File size: 34218 byte(s)
[svn-inject] Forking libglazedlists-java source to Trunk
1 gregoa 372 <!--
2     Glazed Lists
3     Copyright 2003-2006 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="1.7.0"/>
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     <!-- base output directory for build artefacts -->
26     <property name="target.dir" value="target"/>
27    
28     <!-- output directory for compiled classes -->
29     <property name="classes.dir" value="${target.dir}/classes"/>
30    
31     <!-- output directory for compiled test classes -->
32     <property name="testclasses.dir" value="${target.dir}/test-classes"/>
33    
34     <!-- output directory for japex reports -->
35     <property name="reports.dir" value="${target.dir}/reports"/>
36    
37     <!-- output directory for javadocs -->
38     <property name="docs.dir" value="${target.dir}/docs"/>
39    
40     <!-- output directory for demo jar contents -->
41     <property name="demojar.dir" value="${target.dir}/demojar"/>
42    
43     <!-- output directory for java 1.4 build -->
44     <property name="java14_glazedlists.dir" value="${target.dir}/java14_glazedlists"/>
45    
46     <!-- output directory for maven upload bundle -->
47     <property name="maven_bundle.dir" value="${target.dir}/maven_bundle"/>
48    
49     <target name="clean"
50     description="Clean up generated files, forcing them to be rebuilt.">
51    
52     <!-- Delete target directory with all generated build artifacts -->
53     <delete dir="${target.dir}"/>
54    
55     <delete>
56     <fileset dir="${basedir}" defaultexcludes="no">
57     <!-- Delete temporary files from JEdit -->
58     <include name="**/*~"/>
59     </fileset>
60     </delete>
61     </target>
62    
63    
64     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
65     JAVADOC
66     Construct a browsable API.
67     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
68    
69     <target name="docs" depends=""
70     description="Scan the source code to generate the Javadoc API.">
71     <!-- document all the source -->
72     <mkdir dir="${docs.dir}"/>
73     <javadoc
74     destdir="${docs.dir}/api" author="true" use="true" windowtitle="Glazed Lists" source="${java.target.version}">
75     <packageset dir="source"><exclude name="**/impl/**"/><exclude name="**/migrationkit/**"/></packageset>
76     <packageset dir="extensions/swt/source"><exclude name="**/impl/**"/><exclude name="**/migrationkit/**"/></packageset>
77     <packageset dir="extensions/ktable/source"><exclude name="**/impl/**"/></packageset>
78     <packageset dir="extensions/jgoodiesforms/source"><exclude name="**/impl/**"/></packageset>
79     <packageset dir="extensions/nachocalendar/source"><exclude name="**/impl/**"/></packageset>
80     <packageset dir="extensions/jfreechart/source"><exclude name="**/impl/**"/></packageset>
81     <packageset dir="extensions/swinglabs/source"><exclude name="**/impl/**"/></packageset>
82     <classpath><fileset dir="extensions/" includes="**/lib/*.jar"/></classpath>
83     <link href="http://java.sun.com/j2se/${java.target.version}/docs/api/"/>
84     <link href="http://help.eclipse.org/help31/nftopic/org.eclipse.platform.doc.isv/reference/api/"/>
85     <link href="http://www.jdocs.com/formlayout/1.0.4/api/" packagelistloc="extensions/jgoodiesforms/lib"/>
86     <link href="http://nachocalendar.sourceforge.net/doc/"/>
87     <link href="http://www.jfree.org/jfreechart/javadoc/"/>
88     <link href="http://download.java.net/javadesktop/swinglabs/releases/0.8/docs/api/"/>
89    
90     <doctitle><![CDATA[<h1>Glazed Lists 1.7.0</h1>]]></doctitle>
91     <bottom><![CDATA[<a href="http://publicobject.com/glazedlists/" target="_top">Glazed Lists</a>, Copyright &#169; 2003-2006 publicobject.com, O'Dell Engineering.<br>Documentation build by ${user.name} at ${datestamp.dateAndTime}]]></bottom>
92     </javadoc>
93     </target>
94    
95    
96     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
97     JAR
98     Construct the .jar file for use in a library.
99     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
100    
101     <target name="jar" depends="compileall"
102     description="Creates glazedlists jar file containing all UI libraries.">
103     <jar destfile="${target.dir}/glazedlists_${java.target.version.fileFriendlyName}.jar" update="true" index="true">
104     <fileset dir="${classes.dir}">
105     <exclude name="com/publicobject/**"/> <!-- IssuesBrowser -->
106     </fileset>
107     <fileset dir=".">
108     <include name="resources/**"/>
109     </fileset>
110     <manifest>
111     <attribute name="Main-Class" value="ca.odell.glazedlists.impl.Main"/>
112     <attribute name="Sealed" value="true"/>
113     <attribute name="Built-By" value="${user.name}"/>
114     <attribute name="Built-At" value="${datestamp.dateAndTime}"/>
115     <attribute name="Implementation-Version" value="1.7.0"/>
116     <attribute name="Implementation-Title" value="Glazed Lists"/>
117     <attribute name="Implementation-URL" value="http://publicobject.com/glazedlists/"/>
118     <attribute name="Contributors" value="Jesse Wilson, Kevin Maltby, James Lemieux, Rob Eden, Holger Brands"/>
119     <attribute name="Source-Version" value="JDK ${java.target.version}"/>
120     </manifest>
121     </jar>
122     </target>
123    
124    
125     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
126     COMPILE
127     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
128    
129     <target name="compile" depends="core,swing"
130     description="Compile the default components of the source.">
131     </target>
132    
133     <target name="compileall" depends="core,migrationkit,swing,io,swt,ktable,jfreechart,issuesbrowser,swinglabs,treetable"
134     description="Compile all components of the source.">
135     </target>
136    
137     <target name="core" depends="">
138     <mkdir dir="${classes.dir}"/>
139     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
140     <!-- swing -->
141     <exclude name="**/swing/**"/>
142     <!-- io -->
143     <exclude name="**/ctp/**"/>
144     <exclude name="**/io/**"/>
145     <exclude name="**/nio/**"/>
146     <exclude name="**/pmap/**"/>
147     <exclude name="**/rbp/**"/>
148     </javac>
149     </target>
150    
151     <target name="migrationkit" depends="core">
152     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
153     <include name="**/migrationkit/**"/>
154     </javac>
155     </target>
156    
157     <target name="swing" depends="core">
158     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
159     <include name="**/swing/**"/>
160     <exclude name="**/migrationkit/**"/>
161     </javac>
162     </target>
163    
164     <target name="io" depends="core">
165     <javac destdir="${classes.dir}" srcdir="source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
166     <include name="**/ctp/**"/>
167     <include name="**/io/**"/>
168     <include name="**/nio/**"/>
169     <include name="**/pmap/**"/>
170     <include name="**/rbp/**"/>
171     </javac>
172     </target>
173    
174    
175     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
176     EXTENSIONS
177     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
178    
179     <target name="swt" depends="core">
180     <mkdir dir="extensions/swt/lib"/>
181     <java classname="ca.odell.glazedlists.impl.HttpClient">
182     <classpath path="${classes.dir}"/>
183     <arg value="https://glazedlists.dev.java.net/files/documents/1073/25145/swt-api.jar"/>
184     <arg value="extensions/swt/lib/swt-api.jar"/>
185     </java>
186     <javac destdir="${classes.dir}" srcdir="extensions/swt/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
187     <classpath>
188     <fileset dir="extensions/swt/lib/" includes="*.jar"/>
189     </classpath>
190     </javac>
191     </target>
192    
193     <target name="ktable" depends="core,swt,issuesbrowser">
194     <mkdir dir="extensions/ktable/lib"/>
195     <java classname="ca.odell.glazedlists.impl.HttpClient">
196     <classpath path="${classes.dir}"/>
197     <arg value="https://glazedlists.dev.java.net/files/documents/1073/24419/ktable.jar"/>
198     <arg value="extensions/ktable/lib/ktable.jar"/>
199     </java>
200     <javac destdir="${classes.dir}" srcdir="extensions/ktable/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
201     <classpath>
202     <fileset dir="extensions/ktable/lib/" includes="*.jar"/>
203     <fileset dir="extensions/swt/lib/" includes="*.jar"/>
204     </classpath>
205     </javac>
206     </target>
207    
208     <target name="jgoodiesforms" depends="core,swing">
209     <mkdir dir="extensions/jgoodiesforms/lib"/>
210     <java classname="ca.odell.glazedlists.impl.HttpClient">
211     <classpath path="${classes.dir}"/>
212     <arg value="https://glazedlists.dev.java.net/files/documents/1073/27334/forms.jar"/>
213     <arg value="extensions/jgoodiesforms/lib/forms.jar"/>
214     </java>
215     <javac destdir="${classes.dir}" srcdir="extensions/jgoodiesforms/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
216     <classpath>
217     <fileset dir="extensions/jgoodiesforms/lib/" includes="*.jar"/>
218     </classpath>
219     </javac>
220     </target>
221    
222     <target name="swinglabs" depends="core,swing">
223     <!-- the swinglabs .jar is Java 1.5+ only, so we do not bother to run
224     this code through our Java 1.5 to Java 1.4 source code translator -->
225     <mkdir dir="extensions/swinglabs/lib"/>
226     <java classname="ca.odell.glazedlists.impl.HttpClient">
227     <classpath path="${classes.dir}"/>
228     <arg value="https://glazedlists.dev.java.net/files/documents/1073/32966/swingx.jar"/>
229     <arg value="extensions/swinglabs/lib/swingx.jar"/>
230     </java>
231     <javac destdir="${classes.dir}" srcdir="extensions/swinglabs/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
232     <classpath>
233     <fileset dir="extensions/swinglabs/lib/" includes="*.jar"/>
234     </classpath>
235     </javac>
236     </target>
237    
238     <target name="nachocalendar" depends="core,swing">
239     <mkdir dir="extensions/nachocalendar/lib"/>
240     <java classname="ca.odell.glazedlists.impl.HttpClient">
241     <classpath path="${classes.dir}"/>
242     <arg value="https://glazedlists.dev.java.net/files/documents/1073/29958/nachocalendar.jar"/>
243     <arg value="extensions/nachocalendar/lib/nachocalendar.jar"/>
244     </java>
245     <javac destdir="${classes.dir}" srcdir="extensions/nachocalendar/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
246     <classpath>
247     <fileset dir="extensions/nachocalendar/lib/" includes="*.jar"/>
248     </classpath>
249     </javac>
250     </target>
251    
252     <target name="treetable" depends="core,swing">
253     <javac destdir="${classes.dir}" srcdir="extensions/treetable/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on"/>
254     </target>
255    
256     <target name="jfreechart" depends="swing">
257     <mkdir dir="extensions/jfreechart/lib"/>
258     <java classname="ca.odell.glazedlists.impl.HttpClient">
259     <classpath path="${classes.dir}"/>
260     <arg value="https://glazedlists.dev.java.net/files/documents/1073/26197/jcommon.jar"/>
261     <arg value="extensions/jfreechart/lib/jcommon.jar"/>
262     </java>
263     <java classname="ca.odell.glazedlists.impl.HttpClient">
264     <classpath path="${classes.dir}"/>
265     <arg value="https://glazedlists.dev.java.net/files/documents/1073/26198/jfreechart.jar"/>
266     <arg value="extensions/jfreechart/lib/jfreechart.jar"/>
267     </java>
268     <javac destdir="${classes.dir}" srcdir="extensions/jfreechart/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
269     <classpath>
270     <fileset dir="extensions/jfreechart/lib/" includes="*.jar"/>
271     </classpath>
272     </javac>
273     </target>
274    
275     <target name="japex" depends="compile">
276     <!-- download dependencies for japex -->
277     <mkdir dir="extensions/japex/lib"/>
278     <java classname="ca.odell.glazedlists.impl.HttpClient">
279     <classpath path="${classes.dir}"/>
280     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37606/activation.jar"/>
281     <arg value="extensions/japex/lib/activation.jar"/>
282     </java>
283     <java classname="ca.odell.glazedlists.impl.HttpClient">
284     <classpath path="${classes.dir}"/>
285     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37605/japex-all.jar"/>
286     <arg value="extensions/japex/lib/japex-all.jar"/>
287     </java>
288     <java classname="ca.odell.glazedlists.impl.HttpClient">
289     <classpath path="${classes.dir}"/>
290     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37607/mail.jar"/>
291     <arg value="extensions/japex/lib/mail.jar"/>
292     </java>
293     <!-- compile the Japex performance tests -->
294     <javac destdir="${classes.dir}" srcdir="extensions/japex/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
295     <classpath>
296     <fileset dir="extensions/japex/lib/" includes="*.jar"/>
297     </classpath>
298     </javac>
299     <!-- execute the Japex performance tests -->
300     <!--
301     <property name="config" value="extensions/japex/ListEventAssembler-JapexConfig.xml"/>
302     <property name="config" value="extensions/japex/ListEventPublisher-JapexConfig.xml"/>
303     <property name="config" value="extensions/japex/SortedList-JapexConfig.xml"/>
304     -->
305     <property name="config" value="extensions/japex/SortedList-JapexConfig.xml"/>
306     <java dir="." fork="true" classname="com.sun.japex.Japex">
307     <classpath>
308     <fileset dir="extensions/japex/lib/" includes="*.jar"/>
309     </classpath>
310     <sysproperty key="japex.reportsDirectory" value="${reports.dir}"/>
311     <arg line="${config}/"/>
312     </java>
313     </target>
314    
315     <target name="issuesbrowser" depends="core,swing,swt,jfreechart,jgoodiesforms,nachocalendar,treetable">
316     <mkdir dir="extensions/issuesbrowser/lib"/>
317     <java classname="ca.odell.glazedlists.impl.HttpClient">
318     <classpath path="${classes.dir}"/>
319     <arg value="https://glazedlists.dev.java.net/files/documents/1073/37509/http.jar"/>
320     <arg value="extensions/issuesbrowser/lib/http.jar"/>
321     </java>
322     <javac destdir="${classes.dir}" srcdir="extensions/issuesbrowser/source" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
323     <classpath>
324     <fileset dir="extensions/swt/lib/" includes="*.jar"/>
325     <fileset dir="extensions/jfreechart/lib/" includes="*.jar"/>
326     <fileset dir="extensions/jgoodiesforms/lib/" includes="*.jar"/>
327     <fileset dir="extensions/nachocalendar/lib/" includes="*.jar"/>
328     <fileset dir="extensions/issuesbrowser/lib/" includes="*.jar"/>
329     </classpath>
330     </javac>
331     </target>
332    
333     <target name="demojar" depends="clean,issuesbrowser"
334     description="Create a .jar file with the Issues Browser demo application.">
335    
336     <!-- make a temporary folder for assembling the demojar -->
337     <mkdir dir="${demojar.dir}"/>
338    
339     <!-- copy the classes into the demojar folder -->
340     <copy todir="${demojar.dir}">
341     <fileset dir="${classes.dir}"/>
342     </copy>
343    
344     <!-- unjar the third-party classes into the demojar folder -->
345     <unjar src="extensions/jfreechart/lib/jcommon.jar" dest="${demojar.dir}"/>
346     <unjar src="extensions/jfreechart/lib/jfreechart.jar" dest="${demojar.dir}"/>
347     <unjar src="extensions/jgoodiesforms/lib/forms.jar" dest="${demojar.dir}"/>
348     <unjar src="extensions/nachocalendar/lib/nachocalendar.jar" dest="${demojar.dir}"/>
349     <unjar src="extensions/issuesbrowser/lib/http.jar" dest="${demojar.dir}"/>
350    
351     <!-- create a *minimal* set of classes required to execute the swing demo -->
352     <classfileset id="demoClasses" dir="${demojar.dir}" rootclass="com.publicobject.issuesbrowser.swing.IssuesBrowser"/>
353    
354     <!-- create the actual demo jar -->
355     <jar destfile="${target.dir}/glazedlists-demo.jar" update="true" index="true">
356     <fileset refid="demoClasses"/>
357     <fileset dir="${demojar.dir}">
358     <include name="**/LocalizationBundle*.properties"/>
359     <include name="org/jfree/chart/resources/JFreeChartResources.class"/>
360     <include name="org/jfree/resources/JCommonResources.class"/>
361     <include name="net/sf/nachocalendar/language*.properties"/>
362     </fileset>
363     <fileset dir=".">
364     <include name="resources/**"/>
365     </fileset>
366     <fileset dir="extensions/issuesbrowser">
367     <include name="resources/**"/>
368     </fileset>
369     <manifest>
370     <attribute name="Main-Class" value="com.publicobject.issuesbrowser.swing.IssuesBrowser"/>
371     </manifest>
372     </jar>
373    
374     <!-- clean up the demojar folder -->
375     <!--<delete dir="${demojar.dir}"/>-->
376     </target>
377    
378    
379     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
380     CREATE JAVA 1.4-COMPATIBLE PROJECT
381     Create a new project folder java14_glazedlists/ that can be used to
382     build and develop Glazed Lists on J2SE 1.4.
383     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
384    
385     <target name="java14" depends="compileall,compiletests" description="Compile Glazed Lists for deployment on a J2SE 1.4">
386     <!-- clean the java14 directory -->
387     <delete dir="${java14_glazedlists.dir}"/>
388    
389     <!-- download the declawer build tool -->
390     <mkdir dir="tools"/>
391     <java classname="ca.odell.glazedlists.impl.HttpClient">
392     <classpath path="${classes.dir}"/>
393     <arg value="https://glazedlists.dev.java.net/files/documents/1073/25249/declawer.jar"/>
394     <arg value="tools/declawer.jar"/>
395     </java>
396    
397     <!-- Declaw source/ -->
398     <mkdir dir="${java14_glazedlists.dir}/source"/>
399     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
400     <arg value="source"/>
401     <arg value="${ant.home}/lib/junit.jar"/>
402     <arg value="${java14_glazedlists.dir}/source"/>
403     </java>
404    
405     <!-- Declaw test/ -->
406     <mkdir dir="${java14_glazedlists.dir}/test"/>
407     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
408     <arg value="test"/>
409     <arg value="${classes.dir}${path.separator}${ant.home}/lib/junit.jar${path.separator}extensions/jgoodiesforms/lib/forms.jar"/>
410     <arg value="${java14_glazedlists.dir}/test"/>
411     </java>
412    
413     <!-- Declaw swt/ -->
414     <mkdir dir="${java14_glazedlists.dir}/extensions/swt/source"/>
415     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
416     <arg value="extensions/swt/source"/>
417     <arg value="${classes.dir}${path.separator}extensions/swt/lib/swt-api.jar"/>
418     <arg value="${java14_glazedlists.dir}/extensions/swt/source"/>
419     </java>
420    
421     <!-- Declaw jfreechart/ -->
422     <mkdir dir="${java14_glazedlists.dir}/extensions/jfreechart/source"/>
423     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
424     <arg value="extensions/jfreechart/source"/>
425     <arg value="${classes.dir}${path.separator}extensions/jfreechart/lib/jcommon.jar${path.separator}extensions/jfreechart/lib/jfreechart.jar"/>
426     <arg value="${java14_glazedlists.dir}/extensions/jfreechart/source"/>
427     </java>
428    
429     <!-- Declaw nachocalendar/ -->
430     <mkdir dir="${java14_glazedlists.dir}/extensions/nachocalendar/source"/>
431     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
432     <arg value="extensions/nachocalendar/source"/>
433     <arg value="${classes.dir}${path.separator}extensions/nachocalendar/lib/nachocalendar.jar"/>
434     <arg value="${java14_glazedlists.dir}/extensions/nachocalendar/source"/>
435     </java>
436    
437     <!-- Declaw jgoodiesforms/ -->
438     <mkdir dir="${java14_glazedlists.dir}/extensions/jgoodiesforms/source"/>
439     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
440     <arg value="extensions/jgoodiesforms/source"/>
441     <arg value="${classes.dir}${path.separator}extensions/jgoodiesforms/lib/forms.jar"/>
442     <arg value="${java14_glazedlists.dir}/extensions/jgoodiesforms/source"/>
443     </java>
444    
445     <!-- Declaw issuesbrowser/ -->
446     <mkdir dir="${java14_glazedlists.dir}/extensions/issuesbrowser/source"/>
447     <java classname="com.publicobject.declawer.Declawer" classpath="tools/declawer.jar">
448     <arg value="extensions/issuesbrowser/source"/>
449     <arg value="${classes.dir}${path.separator}extensions/swt/lib/swt-api.jar${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"/>
450     <arg value="${java14_glazedlists.dir}/extensions/issuesbrowser/source"/>
451     </java>
452    
453     <!-- Copy all of the resources (non-source files) to the java14 directory. -->
454     <copy todir="${java14_glazedlists.dir}">
455     <fileset dir=".">
456     <exclude name="${target.dir}/**"/>
457     <exclude name="**/*.java"/>
458     <exclude name="**/*.class"/>
459     </fileset>
460     </copy>
461    
462     <!-- Alter the target platform in the java14 build.xml file from 1.5 to 1.4. -->
463     <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;"/>
464     <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;"/>
465     </target>
466    
467    
468     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
469     REDISTRIBUTING THE SOURCE
470     Package the entire Glazed Lists source tree in a .zip file.
471     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
472    
473     <target name="dist" depends="clean"
474     description="Create a .zip file of the source for backup or distribution.">
475     <mkdir dir="${target.dir}"/>
476     <zip destfile="${target.dir}/glazedlists-source_${java.target.version.fileFriendlyName}.zip" basedir=".">
477     <exclude name="${target.dir}/**"/>
478     <exclude name="tools/**"/>
479     <exclude name="extensions/**/lib/**"/>
480     <exclude name="www/**"/>
481     <exclude name="*.iml"/> <!-- Intellij IDEA Module File -->
482     <exclude name="*.ipr"/> <!-- Intellij IDEA Project File -->
483     <exclude name="*.iws"/> <!-- Intellij IDEA Workspace File -->
484     <exclude name="*.tfpt"/> <!-- Performance Test Data (mozillabugs.tfpt, mp3collection.tfpt) -->
485     </zip>
486     </target>
487    
488     <target name="upload" depends="dist,jar"
489     description="Upload binaries to java.net, see http://javanettasks.dev.java.net/">
490    
491     <!-- download the declawer build tool -->
492     <mkdir dir="tools"/>
493     <java classname="ca.odell.glazedlists.impl.HttpClient">
494     <classpath path="${classes.dir}"/>
495     <arg value="https://glazedlists.dev.java.net/files/documents/1073/25945/javanettasks.jar"/>
496     <arg value="tools/javanettasks.jar"/>
497     </java>
498    
499     <!-- prepare the javaNetUpload task -->
500     <taskdef resource="org/kohsuke/javanettasks.properties" classpath="tools/javanettasks.jar"/>
501    
502     <!-- upload source -->
503     <javaNetUpload projectName="glazedlists"
504     toFile="/latest_build/glazedlists-source_${java.target.version.fileFriendlyName}.zip"
505     fromFile="${target.dir}/glazedlists-source_${java.target.version.fileFriendlyName}.zip"
506     fileDescription="Source build by ${user.name} at ${datestamp.dateAndTime}"
507     overwrite="yes"
508     fileStatus="Draft"/>
509    
510     <!-- upload binary -->
511     <javaNetUpload projectName="glazedlists"
512     toFile="/latest_build/glazedlists_${java.target.version.fileFriendlyName}.jar"
513     fromFile="${target.dir}/glazedlists_${java.target.version.fileFriendlyName}.jar"
514     fileDescription="Binary build by ${user.name} at ${datestamp.dateAndTime}"
515     overwrite="yes"
516     fileStatus="Draft"/>
517     </target>
518    
519    
520     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
521     TEST
522     Compile unit tests and run them using JUnit.
523     This task depends on JUnit, available free at http://www.junit.org
524     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
525    
526     <target name="test" depends="compiletests"
527     description="Compile unit tests and run them using JUnit.">
528     <!-- Execute JUnit tests -->
529     <junit printsummary="true" showoutput="false" fork="true"
530     errorProperty="test.failed" failureProperty="test.failed">
531     <assertions>
532     <enable/>
533     </assertions>
534     <classpath>
535     <pathelement location="${classes.dir}"/>
536     <pathelement location="${testclasses.dir}"/>
537     <fileset dir="extensions" includes="**/*.jar"/>
538     <fileset file="${ant.home}/lib/junit.jar"/>
539     </classpath>
540     <formatter type="brief" usefile="false"/>
541     <batchtest>
542     <fileset dir="${testclasses.dir}" includes="**/**Test.class"/>
543     </batchtest>
544     </junit>
545     <fail message="Tests failed. Check test output." if="test.failed"/>
546     </target>
547    
548     <target name="compiletests" depends="compileall">
549     <!-- Verify that JUnit is available on the classpath -->
550     <available classname="junit.framework.TestCase" property="junit.present"/>
551     <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"/>
552     <mkdir dir="${testclasses.dir}"/>
553     <javac destdir="${testclasses.dir}" srcdir="test" debug="on" source="${java.target.version}" target="${java.target.version}" deprecation="on">
554     <classpath>
555     <pathelement location="${classes.dir}"/>
556     <fileset dir="extensions" includes="**/*.jar"/>
557     <fileset file="${ant.home}/lib/junit.jar"/>
558     </classpath>
559     </javac>
560     </target>
561    
562     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
563     MAVEN-BUNDLE
564     Construct the maven upload bundle.
565     It contains the POM, the main artifact, source and javadoc jar
566     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
567     <target name="maven-bundle" depends="jar-sources,jar-javadoc,jar"
568     description="Creates glazedlists upload bundle for maven repository.">
569     <copy file="pom.xml" todir="${maven_bundle.dir}" filtering="true"/>
570     <copy file="${target.dir}/glazedlists_${java.target.version.fileFriendlyName}.jar" tofile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}.jar"/>
571     <jar destfile="${target.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}-bundle.jar">
572     <fileset dir="${maven_bundle.dir}">
573     <include name="pom.xml"/>
574     <include name="glazedlists_${java.target.version.fileFriendlyName}-${version}.jar"/>
575     <include name="glazedlists_${java.target.version.fileFriendlyName}-${version}-sources.jar"/>
576     <include name="glazedlists_${java.target.version.fileFriendlyName}-${version}-javadoc.jar"/>
577     </fileset>
578     </jar>
579     <delete dir="${maven_bundle.dir}"/>
580     </target>
581    
582     <target name="check-version" description="Checks version property">
583     <fail unless="version" message="To build a maven upload bundle the property 'version' must be defined."/>
584     </target>
585    
586     <target name="jar-sources" depends="check-version,dist"
587     description="Create a .jar file containing the source files.">
588     <mkdir dir="${maven_bundle.dir}"/>
589     <copy file="${target.dir}/glazedlists-source_${java.target.version.fileFriendlyName}.zip" tofile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}-sources.jar"/>
590     <jar destfile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}-sources.jar" update="true"/>
591     </target>
592    
593     <target name="jar-javadoc" depends="check-version,docs"
594     description="Create a .jar file containing the javadoc.">
595     <mkdir dir="${maven_bundle.dir}"/>
596     <jar destfile="${maven_bundle.dir}/glazedlists_${java.target.version.fileFriendlyName}-${version}-javadoc.jar" basedir="${docs.dir}/api"/>
597     </target>
598    
599     <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
600     M4
601     Run the m4 preprocessor to generate source code, see
602     Unix: http://www.gnu.org/software/m4/
603     Windows; http://gnuwin32.sourceforge.net/packages/m4.htm
604     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
605     <target name="m4">
606    
607     <!-- generate the four color tree -->
608     <mapper id="bcii_to_fourcolorintermediate" type="glob"
609     from="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"
610     to="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java_intermediate"/>
611     <apply executable="m4" parallel="false">
612     <arg line="--prefix-builtins"/>
613     <arg line="-DVAR_COLOUR_COUNT=4"/>
614     <arg line="-DVAR_WIDE_NODES=true"/>
615     <srcfile/>
616     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"/>
617     <mapper refid="bcii_to_fourcolorintermediate"/>
618     <redirector><outputmapper refid="bcii_to_fourcolorintermediate"/></redirector>
619     </apply>
620    
621     <mapper id="fourcolorintermediate_to_fourcolor" type="glob"
622     from="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java_intermediate"
623     to="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java"/>
624     <apply executable="m4" parallel="false">
625     <arg line="--prefix-builtins"/>
626     <arg line="-DBciiTree=FourColorTree"/>
627     <arg line="-DBciiNode=FourColorNode"/>
628     <arg line="-DBciiTreeAsList=FourColorTreeAsList"/>
629     <arg line="-DBciiTreeIterator=FourColorTreeIterator"/>
630     <srcfile/>
631     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/FourColor*.java_intermediate"/>
632     <mapper refid="fourcolorintermediate_to_fourcolor"/>
633     <redirector><outputmapper refid="fourcolorintermediate_to_fourcolor"/></redirector>
634     </apply>
635    
636     <!-- generate the simple tree -->
637     <mapper id="bcii_to_simpleintermediate" type="glob"
638     from="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"
639     to="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java_intermediate"/>
640     <apply executable="m4" parallel="false">
641     <arg line="--prefix-builtins"/>
642     <arg line="-DVAR_COLOUR_COUNT=1"/>
643     <arg line="-DVAR_WIDE_NODES=false"/>
644     <srcfile/>
645     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/Bcii*.java"/>
646     <mapper refid="bcii_to_simpleintermediate"/>
647     <redirector><outputmapper refid="bcii_to_simpleintermediate"/></redirector>
648     </apply>
649    
650     <mapper id="simpleintermediate_to_simple" type="glob"
651     from="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java_intermediate"
652     to="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java"/>
653     <apply executable="m4" parallel="false">
654     <arg line="--prefix-builtins"/>
655     <arg line="-DBciiTree=SimpleTree"/>
656     <arg line="-DBciiNode=SimpleNode"/>
657     <arg line="-DBciiTreeAsList=SimpleTreeAsList"/>
658     <arg line="-DBciiTreeIterator=SimpleTreeIterator"/>
659     <srcfile/>
660     <fileset dir="${basedir}" includes="source/ca/odell/glazedlists/impl/adt/barcode2/Simple*.java_intermediate"/>
661     <mapper refid="simpleintermediate_to_simple"/>
662     <redirector><outputmapper refid="simpleintermediate_to_simple"/></redirector>
663     </apply>
664    
665     <!-- Delete intermediate files -->
666     <delete>
667     <fileset dir="${basedir}" defaultexcludes="no">
668     <include name="source/ca/odell/glazedlists/impl/adt/barcode2/*.java_intermediate"/>
669     </fileset>
670     </delete>
671    
672     </target>
673    
674     </project>

  ViewVC Help
Powered by ViewVC 1.1.26