|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.clapper.util.ant.HostnameTask
public class HostnameTask
Ant task to retrieve the name of the host on which the build is running, storing the name in a property. Example:
<taskdef name="host"
classname="org.clapper.util.ant.HostnameTask"
classpath="${build}"/>
<host property="build.host"/>
The specified property is always set to something. If the task cannot
retrieve the current host name, it displays a message to standard error
and sets the property to "localhost".
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.Task |
|---|
description, location, target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
project |
| Constructor Summary | |
|---|---|
HostnameTask()
Default constructor |
|
| Method Summary | |
|---|---|
void |
execute()
Execute the Ant task, retrieving the host name and storing it in the property. |
void |
setProperty(java.lang.String prop)
Called by Ant to set the "property" attribute. |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
getProject, setProject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HostnameTask()
| Method Detail |
|---|
public void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException - on errorpublic void setProperty(java.lang.String prop)
prop - the name of the property to be set to the host name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||