|
|
@@ -4733,7 +4733,7 @@ public class MyVeryOwnTask extends Task { |
|
|
|
<ol> |
|
|
|
<li>Make sure the class that implements your task is in the classpath when |
|
|
|
starting Ant.</li> |
|
|
|
<li>In your initialization target, add a <i>taskdef</i> task. This actually adds |
|
|
|
<li>Add a <i>taskdef</i> element to your project. This actually adds |
|
|
|
your task to the system.</li> |
|
|
|
<li>Use your task in the rest of the buildfile.</li> |
|
|
|
</ol> |
|
|
@@ -4742,11 +4742,9 @@ public class MyVeryOwnTask extends Task { |
|
|
|
<pre><?xml version="1.0"?> |
|
|
|
|
|
|
|
<project name="OwnTaskExample" default="main" basedir="."> |
|
|
|
<target name="init"> |
|
|
|
<taskdef name="mytask" classname="com.mydomain.MyVeryOwnTask"/> |
|
|
|
</target> |
|
|
|
<taskdef name="mytask" classname="com.mydomain.MyVeryOwnTask"/> |
|
|
|
|
|
|
|
<target name="main" depends="init"> |
|
|
|
<target name="main"> |
|
|
|
<mytask message="Hello World! MyVeryOwnTask works!" /> |
|
|
|
</target> |
|
|
|
</project> |
|
|
|