You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

hostinfo.html 3.6 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE html>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. https://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <html lang="en">
  17. <head>
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>HostInfo Task</title>
  20. </head>
  21. <body>
  22. <h2 id="hostinfo">HostInfo</h2>
  23. <h3>Description</h3>
  24. <p>Sets the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and <code>ADDR6</code>
  25. properties in the current project.</p>
  26. <p>
  27. The <code>NAME</code> contains the host part of the canonical name of the host.<br/> If the host is
  28. not found, the host will contain the name as provided to the task, or <code>localhost</code> if no
  29. host was provided, and no name for the local host was found.<br/>The <code>DOMAIN</code> contains
  30. the domain part of the canonical name of the host.<br/>If the host is not found, the domain will
  31. contain the domain as provided to the task, or <code>localdomain</code> if no host / domain was
  32. provided.<br/>The <code>ADDR4</code> contains the IPv4 address of the host with the widest
  33. meaning.<br/>If no IPv4 address is found and a host has been provided the
  34. address <code>0.0.0.0</code> is returned, when no host was provided the
  35. address <code>127.0.0.1</code> is returned.<br/>The <code>ADDR6</code> contains the IPv6 address of
  36. the host with the widest meaning.<br/>If no IPv6 address is found and a host has been provided the
  37. address <code>::</code> is returned, when no host was provided the address <code>::1</code> is
  38. returned.</p>
  39. <p>These properties can be used in the build-file, for instance, to create host-stamped filenames,
  40. or used to replace placeholder tags inside documents to indicate, for example, the host where the
  41. build was performed on. The best place for this task is probably in an initialization target.</p>
  42. <h3>Parameters</h3>
  43. <table class="attr">
  44. <tr>
  45. <th scope="col">Attribute</th>
  46. <th scope="col">Description</th>
  47. <th scope="col">Required</th>
  48. </tr>
  49. <tr>
  50. <td>prefix</td>
  51. <td>Prefix used for all properties set.</td>
  52. <td>No; defaults to no prefix</td>
  53. </tr>
  54. <tr>
  55. <td>host</td>
  56. <td>The host to retrieve the information for.</td>
  57. <td>No; default is to retrieve information for the host the task is running on</td>
  58. </tr>
  59. </table>
  60. <h3>Examples</h3>
  61. <p>Set the <code>NAME</code>, <code>DOMAIN</code>, <code>ADDR4</code>, and <code>ADDR6</code> for
  62. the local host, using the most &quot;global&quot; address available.</p>
  63. <pre>&lt;hostinfo/&gt;</pre>
  64. <p>Set the properties <code>remotehost.NAME</code>
  65. to <samp>eos</samp>, <code>remotehost.DOMAIN</code>
  66. to <samp>apache.org</samp>, <code>remotehost.ADDR4</code> to <samp>140.211.11.130</samp>
  67. and <code>remotehost.ADDR6</code> to <samp>::</samp> for the host with the
  68. name <samp>www.apache.org</samp> (provided the canonical name and IP addresses do not change).</p>
  69. <pre>&lt;hostinfo prefix=&quot;remotehost&quot; host=&quot;www.apache.org&quot;/&gt;</pre>
  70. </body>
  71. </html>