| <html> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <title>Conditions Task</title> |
| </head> |
| |
| <body> |
| |
| <h2><a name="Conditions">Conditions</a></h2> |
| |
| <p>These are the nested elements that can be used as conditions in the |
| <a href="condition.html"><code><condition></code></a> and |
| <a href="waitfor.html"><code><waitfor></code></a> tasks.</p> |
| |
| <h4>not</h4> |
| <p>The <code><not></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><and></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><and></code> condition has the same shortcut |
| semantics as the Java && operator, as soon as one of the |
| nested conditions is false, no other condition will be evaluated.</p> |
| |
| <h4>or</h4> <p> |
| The <code><or></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><or></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. Each |
| defined attribute is tested and the result is true only if <i>all</i> |
| the tests succeed. |
| </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> |
| <tr> |
| <td valign="top">name</td> |
| <td valign="top">The name of the operating system to expect.</td> |
| <td valign="top" align="center">No</td> |
| </tr> |
| <tr> |
| <td valign="top">arch</td> |
| <td valign="top">The architecture of the operating system to expect.</td> |
| <td valign="top" align="center">No</td> |
| </tr> |
| <tr> |
| <td valign="top">version</td> |
| <td valign="top">The version of the operating system 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> |
| <li>netware (for Novell NetWare)</li> |
| <li>os/2 (for OS/2)</li> |
| <li>win9x for Microsoft Windows 95 and 98</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> |
| <tr> |
| <td valign="top">casesensitive</td> |
| <td valign="top">Perform a case sensitive comparision. Default is |
| true.</td> |
| <td valign="top" align="center">No</td> |
| </tr> |
| <tr> |
| <td valign="top">trim</td> |
| <td valign="top">Trim whitespace from arguments before comparing |
| them. Default is false.</td> |
| <td valign="top" align="center">No</td> |
| </tr> |
| </table> |
| |
| <h4>isset</h4> |
| <p>Test whether a given property has been set in this project.</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">property</td> |
| <td valign="top">The name of the property to test.</td> |
| <td valign="top" align="center">Yes</td> |
| </tr> |
| </table> |
| |
| <h4>checksum</h4> |
| <p>This condition is identical to the <a href="checksum.html">Checksum</a> |
| task, all attributes and nested elements of that task are supported, |
| the property and overwrite attributes are redundant and will be |
| ignored.</p> |
| |
| <h4>http</h4> |
| <p>The <code>http</code> condition checks for a valid response from a |
| web server of the specified url.</p> |
| <table border="1" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td width="12%" valign="top"><b>Attribute</b></td> |
| <td width="78%" valign="top"><b>Description</b></td> |
| <td width="10%" valign="top"><b>Required</b></td> |
| </tr> |
| <tr> |
| <td valign="top">url</td> |
| <td valign="top">The full URL of the page to request. The web server must |
| return a status code of <500..</td> |
| <td align="center">Yes.</td> |
| </tr> |
| </table> |
| |
| <h4>socket</h4> |
| <p>The <code>socket</code> condition checks for the existence of a |
| TCP/IP listener at the specified host and port.</p> |
| <table border="1" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td width="12%" valign="top"><b>Attribute</b></td> |
| <td width="78%" valign="top"><b>Description</b></td> |
| <td width="10%" valign="top"><b>Required</b></td> |
| </tr> |
| <tr> |
| <td valign="top">server</td> |
| <td valign="top">The DNS name or IP address of the server.</td> |
| <td align="center">Yes.</td> |
| </tr> |
| <tr> |
| <td valign="top">port</td> |
| <td valign="top">The port number to connect to.</td> |
| <td align="center">Yes.</td> |
| </tr> |
| </table> |
| |
| <h4>filesmatch</h4> |
| <p>Test two files for matching. Nonexistence of either file results in "false". |
| This test does a byte for byte comparision, so test time scales with |
| byte size. NB: if the files are different sizes , one of them is missing |
| or the filenames match the answer is so obvious the detailed test is omitted. |
| |
| |
| </p> |
| <table border="1" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td width="12%" valign="top"><b>Attribute</b></td> |
| <td width="78%" valign="top"><b>Description</b></td> |
| <td width="10%" valign="top"><b>Required</b></td> |
| </tr> |
| <tr> |
| <td valign="top">file1</td> |
| <td valign="top">First file to test</td> |
| <td align="center">Yes.</td> |
| </tr> |
| <tr> |
| <td valign="top">file2</td> |
| <td valign="top">Second file to test</td> |
| <td align="center">Yes.</td> |
| </tr> |
| </table> |
| |
| <h4>contains</h4> |
| <p>Tests whether the a given Strings contains another one.</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">string</td> |
| <td valign="top">The string to search in.</td> |
| <td valign="top" align="center">Yes</td> |
| </tr> |
| <tr> |
| <td valign="top">substring</td> |
| <td valign="top">The string to search for.</td> |
| <td valign="top" align="center">Yes</td> |
| </tr> |
| <tr> |
| <td valign="top">casesensitive</td> |
| <td valign="top">Perform a case sensitive comparision. Default is |
| true.</td> |
| <td valign="top" align="center">No</td> |
| </tr> |
| </table> |
| |
| <hr> |
| <p align="center">Copyright © 2001-2002 Apache Software |
| Foundation. All rights Reserved.</p> |
| |
| </body> |
| </html> |