diff --git a/docs/index.html b/docs/index.html index d53776ba9..e4234981a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,7 +17,7 @@
Version 1.0.7 - 2000/02/28
+Version 1.0.8 - 2000/03/04
Let's write our own task, that prints a message on the System.out stream. The task has one attribute called "message".
- public class MyVeryOwnTask extends Task {
+ package com.mydomain;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class MyVeryOwnTask extends Task {
private String msg;
// The method executing the task
public void execute() throws BuildException {
- System.out.println(message);
+ System.out.println(msg);
}
// The setter for the "message" attribute
@@ -2118,13 +2123,15 @@ task has one attribute called "message".
Example
- <project name="TaskTest" default="test" basedir=".">
+ <?xml version="1.0"?>
+
+<project name="OwnTaskExample" default="main" basedir=".">
<target name="init">
<taskdef name="mytask" classname="com.mydomain.MyVeryOwnTask"/>
</target>
- <target name="test">
- <mytask myattr="wombat" />
+ <target name="main" depends="init">
+ <mytask message="Hello World! MyVeryOwnTask works!" />
</target>
</project>