ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/docs/manual/CoreTasks condition.html
Date Thu, 09 Aug 2001 05:48:49 GMT
bodewig     01/08/08 22:48:49

  Modified:    .        WHATSNEW
               docs/manual coretasklist.html
  Added:       docs/manual/CoreTasks condition.html
  Log:
  Documentation for <condition>
  
  Revision  Changes    Path
  1.144     +2 -1      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.143
  retrieving revision 1.144
  diff -u -r1.143 -r1.144
  --- WHATSNEW	2001/08/07 12:02:03	1.143
  +++ WHATSNEW	2001/08/09 05:48:48	1.144
  @@ -63,7 +63,8 @@
   --------------
   
   * New tasks: ear, p4counter, record, cvspass, vsscheckin, vsscheckout,
  -  typedef, sleep, mimemail, set of tasks for Continuus/Synergy, dependset
  +  typedef, sleep, mimemail, set of tasks for Continuus/Synergy, dependset,
  +  condition
   
   * Ant now uses JAXP 1.1
   
  
  
  
  1.16      +1 -0      jakarta-ant/docs/manual/coretasklist.html
  
  Index: coretasklist.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/coretasklist.html,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- coretasklist.html	2001/08/06 14:32:45	1.15
  +++ coretasklist.html	2001/08/09 05:48:49	1.16
  @@ -26,6 +26,7 @@
   <a href="CoreTasks/apply.html">Apply/<i>ExecOn</i></a><br>
   <a href="CoreTasks/available.html">Available</a><br>
   <a href="CoreTasks/chmod.html">Chmod</a><br>
  +<a href="CoreTasks/condition.html">Condition</a><br>
   <a href="CoreTasks/copy.html">Copy</a><br>
   <a href="CoreTasks/copydir.html"><i>Copydir</i></a><br>
   <a href="CoreTasks/copyfile.html"><i>Copyfile</i></a><br>
  
  
  
  1.1                  jakarta-ant/docs/manual/CoreTasks/condition.html
  
  Index: condition.html
  ===================================================================
  <html>
  
  <head>
  <meta http-equiv="Content-Language" content="en-us">
  <title>Ant User Manual</title>
  </head>
  
  <body>
  
  <h2><a name="Condition">Condition</a></h2>
  <h3>Description</h3>
  <p>Sets a property if a certain condition holds true - this is a
  generalization of <a href="available.html">Available</a> and <a
  href="uptodate.html">Uptodate</a>.</p>
  <p>If the condition holds true, the property value is set to true by
  default; otherwise, the property is not set. You can set the value to
  something other than the default by specifying the <code>value</code>
  attribute.</p>
  <p>Conditions are specified as <a href="#nested">nested elements</a>,
  you must specify exactly one condition.</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">property</td>
      <td valign="top">The name of the property to set.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">value</td>
      <td valign="top">The value to set the property to. Defaults to
        &quot;true&quot;.</td>
      <td valign="top" align="center">No</td>
    </tr>
  </table>
  <h3><a name="nested">Parameters specified as nested elements</a></h3>
  <p>All conditions to test are specified as nested elements.</p>
  
  <h4>not</h4>
  <p>The <code>&lt;not&gt;</code> element expects exactly one other
  condition to be nested into this element, negating the result of the
  condition.  It doesn't have any attributes and accepts all nested
  elements of the condition task as nested elements as well.</p>
  
  <h4>and</h4> <p>
  The <code>&lt;and&gt;</code> element doesn't have any attributes and
  accepts an arbitrary number of conditions as nested elements - all
  nested elements of the condition task are supported.  This condition
  is true if all of its contained conditions are, conditions will be
  evaluated in the order they have been specified in the build file.</p>
  <p>The <code>&lt;and&gt;</code> condition has the same shortcut
  semantics as the Java &amp;&amp; operator, as soon as one of the
  nested conditions is false, no other condition will be evaluated.</p>
  
  <h4>or</h4> <p>
  The <code>&lt;or&gt;</code> element doesn't have any attributes and
  accepts an arbitrary number of conditions as nested elements - all
  nested elements of the condition task are supported.  This condition
  is true if at least one of its contained conditions is, conditions
  will be evaluated in the order they have been specified in the build
  file.</p> <p>The <code>&lt;or&gt;</code> condition has the
same
  shortcut semantics as the Java || operator, as soon as one of the
  nested conditions is true, no other condition will be evaluated.</p>
  
  <h4>available</h4>
  <p>This condition is identical to the <a
  href="available.html">Available</a> task, all attributes and nested
  elements of that task are supported, the property and value attributes
  are redundant and will be ignored.</p>
  
  <h4>uptodate</h4>
  <p>This condition is identical to the <a
  href="uptodate.html">Uptodate</a> task, all attributes and nested
  elements of that task are supported, the property and value attributes
  are redundant and will be ignored.</p>
  
  <h4>os</h4>
  <p>Test whether the current operating system is of a given type.</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">family</td>
      <td valign="top">The name of the operating system family to expect.</td>
      <td valign="top" align="center">No</td>
    </tr>
  </table>
  <p>Supported values for the family attribute are:
  <ul>
    <li>windows (for all versions of Microsoft Windows)</li>
    <li>dos (for all Microsoft DOS based operating systems including
      Microsoft Windows and OS/2)</li>
    <li>mac (for all Apple Macintosh systems)</li>
    <li>unix (for all Unix and Unix-like operating systems)</li>
  </ul>
  
  <h4>equals</h4>
  <p>Tests whether the two given Strings are identical</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">arg1</td>
      <td valign="top">First string to test.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
    <tr>
      <td valign="top">arg2</td>
      <td valign="top">Second string to test.</td>
      <td valign="top" align="center">Yes</td>
    </tr>
  </table>
  
  <h3>Examples</h3>
  <pre>
    &lt;condition property=&quot;javamail.complete&quot;&gt;
      &lt;and&gt;
        &lt;available classname=&quot;javax.activation.DataHandler&quot; /&gt;
        &lt;available classname=&quot;javax.mail.Transport&quot; /&gt;
      &lt;/and&gt;
    &lt;/condition&gt;
  </pre>
  <p>sets the property <code>javamail.complete</code> if both the
  JavaBeans Activation Framework and JavaMail are available in the
  classpath.</p>
  
  <pre>
    &lt;condition property=&quot;isMacOsButNotMacOsX&quot;&gt;
      &lt;and&gt;
        &lt;os family=&quot;mac&quot; />
        &lt;not&gt;
          &lt;os family=&quot;unix&quot; />
        &lt;/not&gt;
      &lt;/and&gt;
    &lt;/condition&gt;
  </pre>
  <p>sets the property <code>isMacOsButNotMacOsX</code> if the current
  operating system is MacOS, but not MacOS X - which Ant considers to be
  in the Unix family as well.</p>
  
  <hr>
  <p align="center">Copyright &copy; 2001 Apache Software
  Foundation. All rights Reserved.</p>
  
  </body>
  </html>
  
  
  
  

Mime
View raw message