|
ClassFileSetA classfileset is a specialised type of fileset which, given a set of "root" classes, will include all of the class files upon which the root classes depend. This is typically used to create a jar with all of the required classes for a particular application. classfilesets are typically used by reference. They are declared with an "id" value and this is then used as a reference where a normal fileset is expected.
This type requires the AttributesThe class fileset support the following attributes in addition to those supported by the standard fileset:
Nested ElementsRootWhen more than one root class is required, multiple nested <root> elements may be used
RootFileSet
A root fileset is used to add a set of root classes from a fileset. In this case the entries in
the fileset are expected to be Java class files. The name of the Java class is determined by the
relative location of the classfile in the fileset. So, the file
Examples<classfileset id="reqdClasses" dir="${classes.dir}"> <root classname="org.apache.tools.ant.Project" /> </classfileset> This example creates a fileset containing all the class files upon which the
<jar destfile="minimal.jar"> <fileset refid="reqdClasses"/> </jar> <classfileset id="reqdClasses" dir="${classes.dir}"> <rootfileset dir="${classes.dir}" includes="org/apache/tools/ant/Project*.class"/> </classfileset> This example constructs the classfileset using all the class with names starting with Project in the org.apache.tools.ant package Copyright © 2002 Apache Software Foundation. All rights Reserved. |