/[debian]/libjgoodies-looks-java/tags/2.1.4-1/build.xml
ViewVC logotype

Annotation of /libjgoodies-looks-java/tags/2.1.4-1/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 759 - (hide annotations)
Wed May 30 22:39:53 2007 UTC (14 years, 3 months ago) by tmancill
File MIME type: text/xml
File size: 17081 byte(s)
[svn-buildpackage] Tagging libjgoodies-looks-java (2.1.4-1)
1 gregoa 361 <?xml version="1.0"?>
2     <!--
3 gregoa 474 $Id: build.xml,v 1.29 2006/12/04 11:51:34 karsten Exp $
4 gregoa 361
5     This is a build file for use with the Jakarta Ant build tool, see
6     http://jakarta.apache.org/ant/index.html
7    
8     To build, go to the directory where this file is located and run
9     ant <target>
10     with one of the following targets:
11    
12     clean removes temporary files and directories
13     compile compiles the framework, extras, tutorial and tests
14     javadoc creates the API documentation
15     test compiles and runs the unit tests
16     jar creates a library jar
17     create-dist-dir creates a distribution tree: docs, sources, jar
18     create-dist-zip creates a zipped distribution
19     create-maven-bundle creates a Maven bundle
20     create-all creates the distribution zip and Maven bundle
21    
22     To run the unit tests you MUST set the junit.jar property,
23     for example in your user build.properties file.
24    
25     -->
26    
27     <project default="create-all" basedir="." name="JGoodies Looks" >
28    
29     <!-- ***************************************************************** -->
30     <!-- Give users a chance to override build properties. -->
31     <!-- ***************************************************************** -->
32     <property file="${user.home}/looks.build.properties" />
33     <property file="${user.home}/build.properties" />
34     <property file="${basedir}/build.properties" />
35     <property file="${basedir}/default.properties" />
36    
37    
38     <!-- ***************************************************************** -->
39     <!-- P A T H S -->
40     <!-- ***************************************************************** -->
41     <path id="classpath.tests">
42     <pathelement location="${build.core.dir}" />
43     <pathelement location="${build.test.dir}" />
44     <pathelement location="${junit.jar}" />
45     </path>
46    
47     <path id="classpath.demo">
48     <pathelement location="${build.core.dir}" />
49     <pathelement location="${lib.forms.jar}" />
50     </path>
51    
52    
53    
54     <!-- ***************************************************************** -->
55     <!-- C L E A N -->
56     <!-- ***************************************************************** -->
57     <target name="clean"
58     description="Removes all temporary files and directories." >
59    
60     <delete dir="${build.dir}" />
61     <delete dir="${dist.dir}" />
62     </target>
63    
64    
65     <!-- ***************************************************************** -->
66     <!-- P R E P A R A T I O N -->
67     <!-- ***************************************************************** -->
68     <target name="prepare"
69     description="Prepares the build and distribution targets." >
70    
71     <tstamp>
72     <format property="DATE" pattern="yyyy-MM-dd hh:mm:ss" />
73     </tstamp>
74    
75     <mkdir dir="${build.core.dir}" />
76     <mkdir dir="${build.demo.dir}" />
77    
78     <available
79     property="junit.task.present"
80     classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
81     />
82     <available
83     property="junit.jar.present"
84     file="${junit.jar}"
85     />
86     </target>
87    
88    
89     <!-- ***************************************************************** -->
90     <!-- C O M P I L A T I O N -->
91     <!-- ***************************************************************** -->
92     <target name="compile"
93     depends="compile-core, compile-demo, compile-tests"
94     description="Compiles the l&amp;fs, demo, and tests." />
95    
96     <!-- ***************************************************************** -->
97     <target name="compile-core" depends="prepare"
98     description="Compiles all library sources." >
99     <javac
100     srcdir ="${src.core.dir}"
101     destdir ="${build.core.dir}"
102     encoding ="${build.encoding}"
103     executable ="${build.compile.executable}"
104     fork ="${build.compile.fork}"
105     debug ="${build.compile.debug}"
106     depend ="${build.compile.depend}"
107     deprecation ="${build.compile.deprecation}"
108     nowarn ="${build.compile.nowarn}"
109     optimize ="${build.compile.optimize}"
110     source ="${build.compile.source}"
111     target ="${build.compile.target}"
112     verbose ="${build.compile.verbose}"
113     bootclasspath="${build.boot.classpath}" />
114    
115     <copy toDir="${build.core.dir}" >
116     <fileset dir="${src.core.dir}"
117     includes="com/jgoodies/looks/common/shadow.png,
118     com/jgoodies/looks/plastic/icons/**/*,
119     com/jgoodies/looks/windows/icons/**/*" />
120     </copy>
121     </target>
122    
123     <!-- ***************************************************************** -->
124     <target name="compile-demo" depends="compile-core"
125     description="Compiles the demo sources." >
126     <javac
127     srcdir ="${src.demo.dir}"
128     destdir ="${build.demo.dir}"
129     encoding ="${build.encoding}"
130     executable ="${build.compile.executable}"
131     fork ="${build.compile.fork}"
132     debug ="${build.compile.debug}"
133     depend ="${build.compile.depend}"
134     deprecation ="${build.compile.deprecation}"
135     nowarn ="${build.compile.nowarn}"
136     optimize ="${build.compile.optimize}"
137     source ="${build.compile.source}"
138     target ="${build.compile.target}"
139     verbose ="${build.compile.verbose}"
140     bootclasspath="${build.boot.classpath}"
141     classpathref ="classpath.demo" />
142     </target>
143    
144     <!-- ***************************************************************** -->
145     <target name="compile-tests" depends="compile-core" if="junit.jar.present"
146     description="Compiles the unit tests." >
147     <mkdir dir="${build.test.dir}"/>
148     <javac
149     srcdir ="${src.test.dir}"
150     destdir ="${build.test.dir}"
151     encoding ="${build.encoding}"
152     executable ="${build.compile.executable}"
153     fork ="${build.compile.fork}"
154     debug ="${build.compile.debug}"
155     depend ="${build.compile.depend}"
156     deprecation ="${build.compile.deprecation}"
157     nowarn ="${build.compile.nowarn}"
158     optimize ="${build.compile.optimize}"
159     source ="${build.compile.source}"
160     target ="${build.compile.target}"
161     verbose ="${build.compile.verbose}"
162     bootclasspath="${build.boot.classpath}"
163     classpathref ="classpath.tests" />
164     </target>
165    
166    
167    
168     <!-- ***************************************************************** -->
169     <!-- J A V A D O C -->
170     <!-- ***************************************************************** -->
171     <target name="javadoc" depends="prepare"
172     description="Creates the API documentation using JavaDoc." >
173     <mkdir dir="${build.javadocs.dir}" />
174     <javadoc
175     sourcepath="${src.core.dir}"
176     packagenames="${javadoc.packages}"
177     destdir="${build.javadocs.dir}"
178     encoding="${build.encoding}"
179     access="protected"
180     author="true"
181     version="true"
182     use="true"
183     link="${javadoc.link}"
184     overview="${javadoc.overview}"
185     windowtitle="${Name} ${spec.version} API"
186     doctitle="${Name} ${spec.version} API"
187     bottom="${copyright.message}" >
188     </javadoc>
189     </target>
190    
191    
192     <!-- ***************************************************************** -->
193     <!-- U N I T T E S T S -->
194     <!-- ***************************************************************** -->
195     <target name="test" depends="compile-tests" if="junit.task.present"
196     description="Compiles and runs the unit tests." >
197     <mkdir dir="${build.reports.dir}"/>
198     <junit printsummary="yes" haltonfailure="no" >
199     <classpath refid="classpath.tests"/>
200     <formatter type="plain" />
201     <batchtest fork="yes" todir="${build.reports.dir}">
202     <fileset dir="${src.test.dir}" includes="**/*Test.java" />
203     </batchtest>
204     </junit>
205     </target>
206    
207    
208     <!-- ***************************************************************** -->
209     <!-- J A R -->
210     <!-- ***************************************************************** -->
211     <target name="jar"
212     depends="jar-all, jar-plastic, jar-windows, jar-demo, jar-tiny, jar-fonttest"
213     description="Creates library and example jars." >
214     </target>
215    
216     <!-- ***************************************************************** -->
217     <target name="manifest" depends="prepare"
218     description="Creates the manifest file." >
219     <manifest file="${build.manifest}">
220     <attribute name ="Built-By"
221     value="${user.name}"/>
222     <attribute name ="Specification-Title"
223     value="${spec.title}" />
224     <attribute name ="Specification-Vendor"
225     value="${spec.vendor}" />
226     <attribute name ="Specification-Version"
227     value="${spec.version}" />
228     <attribute name ="Implementation-Title"
229     value="${impl.title}" />
230     <attribute name ="Implementation-Vendor"
231     value="${impl.vendor}" />
232     <attribute name ="Implementation-Version"
233     value="${impl.version} ${DATE}" />
234     </manifest>
235     </target>
236    
237     <!-- ***************************************************************** -->
238     <target name="jar-all" depends="compile, manifest"
239     description="Creates the library jar with all JGoodies l&amp;fs." >
240    
241     <jar
242     destfile="${build.all.jar}"
243     manifest="${build.manifest}" >
244     <fileset dir="${build.core.dir}" />
245     <zipfileset dir="${descriptors.dir}"
246     includes="all.txt"
247     fullpath="META-INF/services/javax.swing.LookAndFeel" />
248     </jar>
249     </target>
250    
251     <!-- ***************************************************************** -->
252     <target name="jar-plastic" depends="compile, manifest"
253     description="Creates the library jar for the Plastic l&amp;fs." >
254    
255     <jar
256     destfile="${build.plastic.jar}"
257     manifest="${build.manifest}" >
258     <fileset dir="${build.core.dir}"
259     excludes="com/jgoodies/looks/windows/**/*" />
260     <zipfileset dir="${descriptors.dir}"
261     includes="plastic.txt"
262     fullpath="META-INF/services/javax.swing.LookAndFeel" />
263     </jar>
264     </target>
265    
266     <!-- ***************************************************************** -->
267     <target name="jar-windows" depends="compile, manifest"
268     description="Creates the library jar for the windows l&amp;f." >
269     <jar
270     destfile="${build.windows.jar}"
271     manifest="${build.manifest}" >
272     <fileset dir="${build.core.dir}"
273     excludes="com/jgoodies/looks/plastic/**/*" />
274     <zipfileset dir="${descriptors.dir}"
275     includes="windows.txt"
276     fullpath="META-INF/services/javax.swing.LookAndFeel" />
277     </jar>
278     </target>
279    
280     <!-- ***************************************************************** -->
281     <target name="jar-demo" depends="jar-plastic"
282     description="Creates the demo jar." >
283     <jar
284     destfile="${build.demo.jar}" >
285     <fileset dir="${build.demo.dir}"
286     excludes="Tiny.*, FontTest.*" />
287     <fileset dir="${src.demo.dir}"
288 gregoa 474 includes="com/jgoodies/looks/demo/resources/**/*" />
289 gregoa 361 <manifest>
290     <attribute name ="Built-By"
291     value="${user.name}"/>
292     <attribute name ="Main-Class"
293     value="com.jgoodies.looks.demo.DemoFrame"/>
294     <attribute name ="Class-Path"
295     value="../lib/${lib.forms.name} ../${dist.all.name}"/>
296     </manifest>
297     </jar>
298     </target>
299    
300     <!-- ***************************************************************** -->
301     <target name="jar-tiny" depends="jar-plastic"
302     description="Creates the tiny jar." >
303     <jar
304     destfile="${build.tiny.jar}" >
305     <fileset dir="${build.demo.dir}"
306     includes="Tiny.*" />
307     <manifest>
308     <attribute name ="Built-By"
309     value="${user.name}"/>
310     <attribute name ="Main-Class"
311     value="Tiny"/>
312     <attribute name ="Class-Path"
313     value="../${dist.all.name}"/>
314     </manifest>
315     </jar>
316     </target>
317    
318    
319     <!-- ***************************************************************** -->
320     <target name="jar-fonttest" depends="jar-plastic"
321     description="Creates the fonttest jar." >
322     <jar
323     destfile="${build.fonttest.jar}" >
324     <fileset dir="${build.demo.dir}"
325     includes="FontTest.*" />
326     <manifest>
327     <attribute name ="Built-By"
328     value="${user.name}"/>
329     <attribute name ="Main-Class"
330     value="FontTest"/>
331     <attribute name ="Class-Path"
332     value="../${dist.all.name}"/>
333     </manifest>
334     </jar>
335     </target>
336    
337    
338     <!-- ***************************************************************** -->
339     <!-- C R E A T E -->
340     <!-- ***************************************************************** -->
341     <target name="create-all" depends="create-dist-zip, create-maven-bundle"
342     description="Creates the distribution zip and Maven bundle." >
343     </target>
344    
345    
346     <target name="create-dist-dir" depends="clean, compile, javadoc, test, jar"
347     description="Creates the distribution directory tree." >
348    
349     <mkdir dir="${dist.dir}" />
350    
351     <!-- Compile the documentation. -->
352     <copy todir="${dist.docs.dir}" >
353     <fileset dir="${docs.dir}" />
354     </copy>
355     <move todir="${dist.docs.dir}" file="${build.javadocs.dir}" />
356    
357     <!-- Copy the examples. -->
358     <copy todir="${dist.demo.dir}" file="${build.demo.jar}" />
359     <copy todir="${dist.demo.dir}" file="${build.tiny.jar}" />
360    
361     <!-- Copy the font test. -->
362     <copy todir="${dist.demo.dir}" file="${build.fonttest.jar}" />
363    
364     <!-- Copy the libraries. -->
365     <copy todir="${dist.lib.dir}" >
366     <fileset dir="${lib.dir}"
367     includes="forms-*.jar" />
368     </copy>
369    
370     <!-- Copy the source directories. -->
371     <copy todir="${dist.src.dir}" >
372     <fileset dir="${src.dir}" />
373     </copy>
374    
375     <!-- Copy the distribution files. -->
376     <copy todir="${dist.dir}" >
377     <fileset dir="${top.dir}"
378     includes="*.txt, *.html, *.xml, *.properties"
379     excludes="todo.txt" />
380     </copy>
381    
382     <!-- Copy the jar files. -->
383     <copy tofile="${dist.all.jar}" file="${build.all.jar}" />
384     <!--
385     <copy tofile="${dist.plastic.jar}" file="${build.plastic.jar}" />
386     <copy tofile="${dist.windows.jar}" file="${build.windows.jar}" />
387     // -->
388    
389     </target>
390    
391     <!-- ***************************************************************** -->
392     <target name="create-dist-zip" depends="create-dist-dir"
393     description="Packages the distribution as a zip file." >
394    
395     <zip
396     destfile="${dist.zip}"
397     basedir="${dist.root.dir}"
398     includes="${dist.subdir}/**/*" />
399     </target>
400    
401     <!-- ***************************************************************** -->
402     <target name="create-maven-bundle" depends="create-dist-dir"
403     description="Creates a Maven bundle for the Ibiblio upload." >
404    
405     <!-- Copy the Maven pom template. -->
406     <copy tofile="${dist.maven.pom}" file="${build.maven.pom.template}" />
407     <!-- Replace the version in the pom.xml. -->
408     <replace file="${dist.maven.pom}"
409     token="@impl.version"
410     value="${impl.version}" />
411    
412     <copy tofile="${dist.maven.bin.jar}" file="${build.all.jar}" />
413     <jar
414     destfile="${dist.maven.src.jar}"
415     basedir="${dist.src.dir}" />
416     <jar
417     destfile="${dist.maven.bundle}"
418     basedir="${build.maven.dir}" />
419     </target>
420    
421    
422     </project>

  ViewVC Help
Powered by ViewVC 1.1.26