Main problem was having the nested classes as 'static.
Jan
import java.util.ArrayList;
import java.util.List;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.DataType;
public class MyTask extends Task {
// Hold a list of real Things-
Jan,
Thanks for the help.
Following your suggestion, this is what I have:
public class MyTask extends Task {
private String a;
private String b;
private List things = new ArrayList();
public void execute() {
for (String t : things)
System.out.println (t)
You have several things:
- add to
class MyTask extends Task { addThings(Things t)
- add to
class Things extends DataType { addThing(Thing t)
- add text to
class Thing extends DataType { addText(String t)
For documentation:
* Tutorial about writing tasks
http://ant.apache.org/manual/t