[Ant] Passer un "path" à une tâche Ant
Bonjour,
Je suis en train d'écrire une tâche Ant, et j'aimerai lui passer un "path".
Code:
1 2 3 4
| <path id="my.path">
<pathelement path="C:/libs/guice-1.0.jar" />
<pathelement path="C:/libs/aopalliance.jar" />
</path> |
...
<my-task pathid="${my.path}" />
...
Avec ce code (qui ne marche pas) :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.Path;
public class MyTask extends Task {
private Path path;
public void execute() {
System.out.println(path);
super.execute();
}
public void setPathId(final Path path) {
this.path = path;
}
} |
Comment faire ? :calim2:
Merci !
Toine