source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/OptionalTypes/classfileset.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 3.3 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Language" content="en-us">
4<title>ClassFileSet Type</title>
5<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
6</head>
7
8<body>
9<h2><a name="fileset">ClassFileSet</a></h2>
10<p>A classfileset is a specialised type of fileset which, given a set of
11&quot;root&quot; classes, will include all of the class files upon which the
12root classes depend. This is typically used to create a jar with all of the
13required classes for a particular application.
14</p>
15<p>
16classfilesets are typically used by reference. They are declared with an
17&quot;id&quot; value and this is then used as a reference where a normal fileset
18is expected.
19</p>
20<p>
21This type requires the <code>jakarta-BCEL</code> library.
22</p>
23
24
25<h3>Attributes</h3>
26<p>The class fileset support the following attributes in addition
27to those supported by the
28<a href="../CoreTypes/fileset.html">standard fileset</a>:
29</p>
30
31<table border="1" cellpadding="2" cellspacing="0">
32 <tr>
33 <td valign="top"><b>Attribute</b></td>
34 <td valign="top"><b>Description</b></td>
35 <td align="center" valign="top"><b>Required</b></td>
36 </tr>
37 <tr>
38 <td valign="top">rootclass</td>
39 <td valign="top">A single root class name</td>
40 <td valign="top" align="center">No</td>
41 </tr>
42</table>
43
44<h3>Nested Elements</h3>
45
46<h4>Root</h4>
47<p>
48When more than one root class is required, multiple nested <code>&lt;root&gt;</code> elements
49may be used
50</p>
51<table border="1" cellpadding="2" cellspacing="0">
52 <tr>
53 <td valign="top"><b>Attribute</b></td>
54 <td valign="top"><b>Description</b></td>
55 <td align="center" valign="top"><b>Required</b></td>
56 </tr>
57 <tr>
58 <td valign="top">classname</td>
59 <td valign="top">The fully qualified name of the root class</td>
60 <td align="center" valign="top">Yes</td>
61 </tr>
62</table>
63
64<h4>RootFileSet</h4>
65<p>
66A root fileset is used to add a set of root classes from a fileset. In this case the entries in
67the fileset are expected to be Java class files. The name of the Java class is determined by the
68relative location of the classfile in the fileset. So, the file
69<code>org/apache/tools/ant/Project.class</code> corresponds to the Java class
70<code>org.apache.tools.ant.Project</code>.</p>
71
72<h4>Examples</h4>
73<blockquote><pre>
74&lt;classfileset id=&quot;reqdClasses" dir=&quot;${classes.dir}&quot;&gt;
75 &lt;root classname=&quot;org.apache.tools.ant.Project&quot;/&gt;
76&lt;/classfileset&gt;
77</pre></blockquote>
78
79<p>This example creates a fileset containing all the class files upon which the
80<code>org.apache.tools.ant.Project</code> class depends. This fileset could
81then be used to create a jar.
82</p>
83
84<blockquote><pre>
85&lt;jar destfile=&quot;minimal.jar&quot;&gt;
86 &lt;fileset refid=&quot;reqdClasses&quot;/&gt;
87&lt;/jar&gt;
88</pre></blockquote>
89
90<blockquote><pre>
91&lt;classfileset id=&quot;reqdClasses&quot; dir=&quot;${classes.dir}&quot;&gt;
92 &lt;rootfileset dir=&quot;${classes.dir}&quot; includes=&quot;org/apache/tools/ant/Project*.class&quot;/&gt;
93&lt;/classfileset&gt;
94</pre></blockquote>
95
96<p>This example constructs the classfileset using all the class with names starting with Project
97in the org.apache.tools.ant package</p>
98
99<hr>
100<p align="center">Copyright &copy; 2002,2004 The Apache Software Foundation. All rights
101Reserved.</p>
102
103</body>
104</html>
105
Note: See TracBrowser for help on using the repository browser.