https://issues.apache.org/bugzilla/show_bug.cgi?id=45861
Summary: Add new "ant.host.*" properties (code included)
Product: Ant
Version: 1.7.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: enhancement
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Can we add these useful properties:
MagicNames.java
public static final String ANTHOSTADDRESS_PROPERTY =
"ant.host.address";
public static final String ANTHOSTNAME_PROPERTY = "ant.host.name";
public static final String ANTHOSTQNAME_PROPERTY = "ant.host.qname";
Project.java
import java.net.InetAddress;
public void initProperties() throws BuildException {
{
...
try
{
InetAddress rInetAddress =
InetAddress.getLocalHost();
System.setProperty(ANTHOSTADDRESS_PROPERTY,
rInetAddress.getHostAddress());
System.setProperty(ANTHOSTNAME_PROPERTY,
rInetAddress.getHostName());
System.setProperty(ANTHOSTFULLNAME_PROPERTY,
rInetAddress.getCanonicalHostName());
}
catch (UnknownHostException e)
{
System.setProperty(ANTHOSTADDRESS_PROPERTY, "0.0.0.0");
System.setProperty(ANTHOSTNAME_PROPERTY, "localhost");
System.setProperty(ANTHOSTQNAME_PROPERTY, "localhost");
}
...
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.