properties in the current project.
NAME contains the host part of the canonical name of the host.
If the host is not found, the host will contain the name as provided to the task, or
localhost if no
host was provided, and no name for the local host was found.
the domain part of the canonical name of the host.
If the host is not found, the domain will contain the domain as provided to the task, or
localdomain if no host / domain was
ADDR4 contains the IPv4 address of the host with the widest
If no IPv4 address is found and a host has been provided the address
0.0.0.0 is returned, when no host was provided the
127.0.0.1 is returned.
ADDR6 contains the IPv6 address of
the host with the widest meaning.
If no IPv6 address is found and a host has been provided the address
:: is returned, when no host was provided the address
These properties can be used in the build-file, for instance, to create host-stamped filenames, or used to replace placeholder tags inside documents to indicate, for example, the host where the build was performed on. The best place for this task is probably in an initialization target.
|prefix||Prefix used for all properties set.||No; defaults to no prefix|
|host||The host to retrieve the information for.||No; default is to retrieve information for the host the task is running on|
the local host, using the most "global" address available.
Set the properties
remotehost.ADDR4 to 220.127.116.11
remotehost.ADDR6 to :: for the host with the
name www.apache.org (provided the canonical name and IP addresses do not change).
<hostinfo prefix="remotehost" host="www.apache.org"/>