ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Spurling" <nathaniel.spurl...@db.com>
Subject RE: submit new java-linking task
Date Thu, 14 Jun 2001 19:05:36 GMT



     From: Jerome Lacoste <jerome.lacoste@smartcardsystem.com> on 14.06.2001 17:33 ZE2

     Interesting [to me at least]

     could you publish an example of how you use the task, or best the HTML
     manual that describes your task?

     Cheers

     Jerome

>From the line below this one, to the bottom of the page is an html manual page describing
the task:

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Ant User Manual</title>
</head>

<body>

<h2><a name="resolvedependencies">ResolveDependencies</a></h2>

<h3>Description</h3>

<p>The resolvedependencies task takes a set of input java (class and/or source) files,
locates their class files and determines all the classes on which the inputs are
dependant, by parsing the classes according to the rules in <a
href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html">http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html</a>
.</p>

<p>Lists of class-names can be excluded from the search, and the results can be output
to
a file, or the utility can copy the actual class files to a directory (e.g. for jar-ing up
prior to deployment).</p>

<p>Where (multiple attributes possible) is specified, it is possible to include multiple
instances of this property in the task definition. e.g. the 'ignore' property could appear
twice, in each case the value might specify a different filename - both files would be
scanned for class-names to ignore.</p>

<p>Input classes are classes referred to by&nbsp; the Attributes which begin with
'input'</p>

<p>Output classes are those upon which the input classes depend and the class files
for
which can be found.</p>

<p>Missing classes are those upon which the input classes depend but the class files
for
which cannot be found.</p>

<p>Class files are found by scanning the directories and jars referred to by the classpath
attribute.</p>

<h3>Parameters</h3>

<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top"><b>Attribute</b></td>
    <td valign="top"><b>Description</b></td>
    <td align="center" valign="top"><b>Required</b></td>
  </tr>
  <tr>
    <td valign="top">classpath</td>
    <td valign="top">(multiple attributes possible) delimited list of directories/jars
to scan
    for class-files (delimiter is File.separatorChar)</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">inputsourcepath</td>
    <td valign="top">(multiple attributes possible) find and resolve class files defining
    .java files in this path</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">inputclasspath</td>
    <td valign="top">(multiple attributes possible) find and resolve parse all .class
files in
    this path</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">inputclass</td>
    <td valign="top">(multiple attributes possible) find and resolve class-file corresponding
    to class named by this property</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">inputclassfile</td>
    <td valign="top">(multiple attributes possible) resolve class-file named by this
property</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">inputclassdir</td>
    <td valign="top">(multiple attributes possible) resolve class-files in directory
named by
    this property</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">inputclasspathlist</td>
    <td valign="top">(multiple attributes possible) find and resolve class-files listed
in
    file named by this property</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">ignore</td>
    <td valign="top">(multiple attributes possible) ignore classes listed in file named
by
    this property</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">outputfile</td>
    <td valign="top">write list of output classnames to file named by this attribute</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">copyfiles</td>
    <td valign="top">copy output class-files to directory named by this attribute</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">verbose</td>
    <td valign="top">set verbosity options; print: a=none,i=ignored,n=input,o=output,m=missing,c=copyfiles,p=inPath,v=ultraverbose</td>
    <td valign="top" align="center">No</td>
  </tr>
  <tr>
    <td valign="top">recurse</td>
    <td valign="top">recurse disassembly - find and disassemble classes until all are
resolved
    (1=true, 0=false) if false resolve only input classes</td>
    <td valign="top" align="center">No</td>
  </tr>
</table>

<h3>Usage</h3>

<p>A couple of examples:</p>

<pre>
        &lt;resolvedependencies recurse=&quot;1&quot; verbose=&quot;m&quot;
copyfiles=&quot;deployment/project1&quot;&gt;
            &lt;ignore value=&quot;jre13classes.lst&quot;/&gt;
            &lt;ignore value=&quot;oracleclasses.lst&quot;/&gt;
            &lt;inputsourcepath value=&quot;src/MyOtherClasses&quot;/&gt;
            &lt;classpath value=&quot;rt.jar:myclasses.jar&quot;/&gt;
        &lt;/resolvedependencies&gt; </pre>

<p>Copies all class files needed by input classes to deployment/project1 directory,
creating directory structure which corresponds to classes' packages. </p>

<p>Input classes are those defined in .java files in src/MyOtherClasses. </p>

<p>Finds class files by looking first in rt.jar, then in myclass.jar. </p>

<p>Ignores classes named in jre13classes.lst, vbjorb4classes.lst, oracleclasses.lst,
mailclasses.lst; these files contain one class-name per line in
&lt;package&gt;/&lt;classname&gt; format e.g. java/lang/String. </p>

<p>Prints list of missing classes (not found in rt.jar or myclasses.jar) to console.</p>

<p>&nbsp;</p>

<pre>     &lt;resolvedependencies recurse=&quot;1&quot; verbose=&quot;oi&quot;
outputfile=&quot;link_classes&quot;&gt;
            &lt;ignore value=&quot;jre13classes.lst&quot;/&gt;
            &lt;inputclassdir value=&quot;classes/TestPackage&quot;/&gt;
            &lt;classpath value=&quot;myclasses:myotherclasses.jar&quot;/&gt;
        &lt;/resolvedependencies&gt;</pre>

<p>Writes a file named link_classes, containing one class-name per line in
&lt;package&gt;/&lt;classname&gt; format (e.g. javax/swing/table/TableColumn).
</p>

<p>link_classes contains all classes needed by the classes defined in all .class files
in
the directory: classes/TestPackage</p>

<p>Finds class files by looking in myotherclasses.jar and under myclasses directory
-
assumes classes are stored in directory structure corresponding to their package-names </p>

<p>Ignores classes named in jre13classes.lst. </p>

<p>Prints list of input classes and list of output classes to console.<br>
&nbsp; </p>

<hr>

<p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.</p>
</body>
</html>





--

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and
destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.


Mime
View raw message