ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/docs/manual/CoreTasks antjar.html antlib.html
Date Mon, 12 Nov 2001 07:46:27 GMT
stevel      01/11/11 23:46:27

  Added:       docs/manual/CoreTasks antjar.html antlib.html
  Log:
  Jose Alberto Fernandez's ant descriptor loader
  
  Revision  Changes    Path
  1.1                  jakarta-ant/docs/manual/CoreTasks/antjar.html
  
  Index: antjar.html
  ===================================================================
  <html>
  
  <head>
  <meta http-equiv="Content-Language" content="en-us">
  <title>Ant User Manual</title>
  </head>
  
  <body>
  
  <h2><a name="antjar">AntJar</a></h2>
  <h3>Description</h3>
  <p>An extension of the <a href="jar.html">Jar</a> task with special
  treatment for the library descriptor file that should end up in the
  <code>META-INF</code> directory of the Ant Archive.</p>
  <p>This task validates the provided library descriptor making certain
  it specifies the following SYSTEM ID: 
  <b>&quot;http://jakarta.apache.org/ant/AntlibV1_0.dtd&quot;</b>. 
  This DTD is defined as follows:</p>
  <pre>
  &lt;?xml version='1.0' encoding="UTF8" ?&gt;
  
  &lt;!-- 
  This file defines the XML format for ANT library descriptors.
  Descriptors must especify a DOCTYPE of 
  "http://jakarta.apache.org/ant/Antlib-V1_0.dtd"
  as the SystemId for the document.
  --&gt;
  
  &lt;!-- Root element for the Antlib descriptor.                 --&gt;
  &lt;!ELEMENT antlib (task | type)* &gt;
  &lt;!ATTLIST antlib
            version  CDATA #IMPLIED
  &gt;
  
  &lt;!-- Declaration of tasks contained in the library.          --&gt;
  &lt;!ELEMENT task EMPTY&gt;
  &lt;!ATTLIST task 
            name     CDATA #REQUIRED
            class    CDATA #REQUIRED
  &gt;
  
  &lt;!-- Declaration of datatypes contained in the library       --&gt;
  &lt;!ELEMENT type EMPTY&gt;
  &lt;!ATTLIST type 
            name     CDATA #REQUIRED
            class    CDATA #REQUIRED
  &gt;
  
  </pre>
  <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">antxml</td>
      <td valign="top">The library descriptor to use (META-INF/antlib.xml).</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top"><b>Others...</b></td>
      <td valign="top">All attributes inherited form the 
                       <a href="jar.html">Jar task</a>.</td>
      <td valign="top" align="center"> </td>
    </tr>
  </table>
  <h3>Nested elements</h3>
  See the nested elements of the <a href="jar.html">Jar task</a>.
  <h3>Examples</h3>
  <pre>  &lt;jar file=&quot;${dist}/lib/app.jar&quot; 
         antxml=&quot;${src}/applib.xml&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre>
  <p>jars all files in the <code>${build}/classes</code> directory into
a file
  called <code>app.jar</code> in the <code>${dist}/lib</code> directory
and
  sets the content of <code>${src}/applib.xml</code> as the library descriptor
  in <code>META-INF/antlib.xml</code>.</p>
  <p>Here is a sample <code>META-INF/antlib.xml</code>:</p>
  <pre>
  &lt;?xml version="1.0" encoding="UTF8" ?&gt;
  &lt;!DOCTYPE antlib  SYSTEM "http://jakarta.apache.org/ant/Antlib-V1_0.dtd" &gt;
  
  &lt;antlib version="1.0" &gt;
    &lt;task name="case" class="org.apache.ant.contrib.Case" /&gt;
  &lt;/antlib&gt;
  
  </pre>
  <hr>
  <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  Reserved.</p>
  
  </body>
  </html>
  
  
  
  
  1.1                  jakarta-ant/docs/manual/CoreTasks/antlib.html
  
  Index: antlib.html
  ===================================================================
  <html>
  
  <head>
  <meta http-equiv="Content-Language" content="en-us">
  <title>Ant User Manual</title>
  </head>
  
  <body>
  
  <h2><a name="antlib">AntLib</a></h2>
  <h3>Description</h3>
  <p>Defines and loads any tasks and datatypes contained in an ANT library.</p>
  <p>It also allows the aliasing of the names being defined in order to avoid 
  collisions and provides means to override definitions with the ones defined
  in the library.</p>
  Ant libraries can be loaded in the current classloader, which is more efficient,
  but requires the tasks to be in the path already (such as in the ant lib 
  directory) - set <tt>useCurrentClassloader</tt> to true to enable this.
  It is also possible to add more libraries to the path, such as any 
  libraries the task is dependent on. 
    
  <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">file</td>
      <td valign="top">The jar-file of the library.</td>
      <td align="center" valign="middle" rowspan="2">at least one of the two</td>
    </tr>
    <tr>
      <td valign="top">library</td>
      <td valign="top">The name of a library relative to ${ant.home}/lib.</td>
    </tr>
    <tr>
      <td valign="top">override</td>
      <td valign="top">Replace any existing definition with the same name. (&quot;true&quot;/&quot;false&quot;).
When &quot;false&quot; already defined tasks
           and datatytes take precedence over those in the library.
  	 Default is &quot;false&quot; when omitted.</td>
      <td align="center" valign="top">No</td>
    </tr>
    <tr>
      <td valign="top">useCurrentClassloader</td>
      <td valign="top">Set to &quot;true&quot; to avoid using a separate
      ClassLoader for the tasks in the library. Using this option requires
      that the library jar is already accessible by the ClassLoader of
      the project.  Default is &quot;false&quot;.
      </td>
      <td align="center" valign="top">No</td>
    </tr>
    <tr>
      <td valign="top">classpath</td>
      <td valign="top">A 
      <a href="../using.html#path">classpath</a>
      for extra libraries to pull in.
      </td>
      <td valign="top" align="center">No</td>
    </tr>  
  </table>
  <h3><a name="nested">Parameters specified as nested elements</a></h3>
  
  <h4>alias</h4>
  <p>Specifies the usage of a different name from that defined in the library
  descriptor.</p>
  <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">name</td>
      <td valign="top">The name used in the library descriptor.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">as</td>
      <td valign="top">The alias to use in the project.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
  </table>
  <p>Specifies the usage of a different name from that defined in the library
  descriptor. This is used to deal with name clashes </p>
  
  <h4>classpath</h4>
  <h4>classpath</h4>
  
  A classpath of extra libraries to import to support this task. 
  
  <h4>classpathref</h4>
  A reference to an existing classpath. 
  
  <h3>Examples</h3>
  <pre>  &lt;antlib file=&quot;${build}/lib/mylib.jar&quot;/&gt;</pre>
  <p>loads the definitions from the library located at 
  <code>${build}/lib/ant.jar</code>.</p>
  <pre>  &lt;antlib library=&quot;optional.jar&quot;/&gt;</pre>
  <p>loads the definitions from the library <code>optional.jar</code> 
  located at <code>${ant.home}/lib</code>.</p>
  <pre>  &lt;antlib file=&quot;${build}/lib/mylib.jar&quot&gt;
      &lt;alias name=&quot;echo&quot; as=&quot;myecho&quot;/&gt;
    &lt;/antlib&gt;
  </pre>
  <p>loads the definitions from the library located at 
  <code>${build}/lib/ant.jar</code> but uses the name 
  &quot;<code>myecho</code>&quot; for the &quot;<code>echo</code>&quot;
task
  declared in the library.</p>
  
  <hr><p align="center">Copyright &copy; 2000,2001 Apache Software Foundation.
All rights
  Reserved.</p>
  
  </body>
  </html>
  
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message