2018-12-21 11:20:43 +01:00
|
|
|
<!DOCTYPE html>
|
2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
2019-05-25 13:41:47 +02:00
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
2006-09-11 04:19:00 +00:00
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2018-12-21 11:20:43 +01:00
|
|
|
<html lang="en">
|
2002-04-04 12:58:23 +00:00
|
|
|
<head>
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2002-04-04 12:58:23 +00:00
|
|
|
<title>ClassFileSet Type</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2018-02-08 16:59:52 +01:00
|
|
|
<h2 id="fileset">ClassFileSet</h2>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>A classfileset is a specialized 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.
|
2002-04-04 12:58:23 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2018-02-28 07:58:59 +01:00
|
|
|
classfilesets are typically used by reference. They are declared with an <var>id</var> value and
|
|
|
|
this is then used as a reference where a normal fileset is expected.
|
2002-04-04 12:58:23 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2018-02-28 07:58:59 +01:00
|
|
|
This type requires
|
|
|
|
the <code>BCEL</code> <a href="../install.html#librarydependencies">library</a>.
|
2002-04-04 12:58:23 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>Attributes</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>
|
|
|
|
The class fileset support the following attributes in addition to those supported by
|
|
|
|
the <a href="fileset.html">standard fileset</a>:
|
2002-04-04 12:58:23 +00:00
|
|
|
</p>
|
2018-02-08 16:59:52 +01:00
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2002-04-04 12:58:23 +00:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Attribute</th>
|
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Required</th>
|
2002-04-04 12:58:23 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>rootclass</td>
|
|
|
|
<td>A single root class name</td>
|
|
|
|
<td>No</td>
|
2002-04-04 12:58:23 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2018-03-05 21:01:42 +01:00
|
|
|
<h3>Nested elements</h3>
|
2002-04-04 12:58:23 +00:00
|
|
|
|
|
|
|
<h4>Root</h4>
|
|
|
|
<p>
|
2004-11-19 09:07:12 +00:00
|
|
|
When more than one root class is required, multiple nested <code><root></code> elements
|
2002-04-04 12:58:23 +00:00
|
|
|
may be used
|
|
|
|
</p>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2002-04-04 12:58:23 +00:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Attribute</th>
|
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Required</th>
|
2002-04-04 12:58:23 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>classname</td>
|
|
|
|
<td>The fully qualified name of the root class</td>
|
|
|
|
<td>Yes</td>
|
2002-04-04 12:58:23 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2002-04-08 13:57:06 +00:00
|
|
|
<h4>RootFileSet</h4>
|
|
|
|
<p>
|
2018-03-10 20:17:33 +01:00
|
|
|
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
|
2018-02-28 07:58:59 +01:00
|
|
|
relative location of the classfile in the fileset. So, the
|
|
|
|
file <code>org/apache/tools/ant/Project.class</code> corresponds to the Java
|
2018-03-10 20:17:33 +01:00
|
|
|
class <code class="code">org.apache.tools.ant.Project</code>.</p>
|
2002-04-08 13:57:06 +00:00
|
|
|
|
2002-04-04 12:58:23 +00:00
|
|
|
<h4>Examples</h4>
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2002-04-04 12:58:23 +00:00
|
|
|
<classfileset id="reqdClasses" dir="${classes.dir}">
|
2004-11-19 09:07:12 +00:00
|
|
|
<root classname="org.apache.tools.ant.Project"/>
|
2018-02-28 07:58:59 +01:00
|
|
|
</classfileset></pre>
|
|
|
|
<p>
|
|
|
|
This example creates a fileset containing all the class files upon which
|
2018-03-10 20:17:33 +01:00
|
|
|
the <code class="code">org.apache.tools.ant.Project</code> class depends. This fileset could then be
|
|
|
|
used to create a jar.
|
2002-04-04 12:58:23 +00:00
|
|
|
</p>
|
|
|
|
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2002-09-04 11:05:19 +00:00
|
|
|
<jar destfile="minimal.jar">
|
2002-04-04 12:58:23 +00:00
|
|
|
<fileset refid="reqdClasses"/>
|
2018-02-28 07:58:59 +01:00
|
|
|
</jar></pre>
|
2002-04-04 12:58:23 +00:00
|
|
|
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2002-04-08 13:57:06 +00:00
|
|
|
<classfileset id="reqdClasses" dir="${classes.dir}">
|
2002-09-04 11:05:19 +00:00
|
|
|
<rootfileset dir="${classes.dir}" includes="org/apache/tools/ant/Project*.class"/>
|
2018-02-28 07:58:59 +01:00
|
|
|
</classfileset></pre>
|
|
|
|
<p>
|
2018-03-10 20:17:33 +01:00
|
|
|
This example constructs the classfileset using all the class with names starting
|
|
|
|
with <code class="code">Project</code> in the <code class="code">org.apache.tools.ant</code>
|
|
|
|
package.
|
2018-02-28 07:58:59 +01:00
|
|
|
</p>
|
2002-04-04 12:58:23 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|