Hello,
I have problems to write a task. The example in the doc files doesn't work (it
uses two
variables, 'msg' and 'message'):
public class MyVeryOwnTask extends Task {
private String msg;
// The method executing the task
public void execute() throws BuildException {
System.out.println(message);
}
// The setter for the "message" attribute
public void setMessage(String msg) {
this.msg = msg;
}
}
Even if I set everything to 'message' I get a nullpointerexception thrown by
org.apache.tools.ant.Project.createTask(Project.java)
I tried it without any attributes and setters in the class, but had the same
result. I also
tried different approaches to make the new task class accessible: putting it
into the
classpath or putting it into /jre/lib/ext: nothing helped. From the commandline
a man
method in this class is accessible.
I use jdk 1.2.2 on win 98.
Maybe somebody could point me to a working example?
Thanks in advance,
Fotis
BTW:
In the ant docs the next example would profit by using the same attribute, that
is
'message', instead of myattr:
<target name="test">
<mytask myattr="wombat" />
</target>
Another point: If you subscribe to ant-dev, you get a help file which
repeatedly points
you to jakarta-apache.org, p.e. in <[EMAIL PROTECTED]>, which must be
jakarta.apache.org