<?xml version="1.0"?>
<!-- builds foo.jxe -->
<project name="wrap" default = "build" basedir = ".">
<property name = "tool" value = "foo" />
<property name = "classes" value = "${tool}.classes" />
<property
name = "jlink"
value = "jlink ${org.jxe.Tools}/${tool}.jxe ${tool}.properties ${classes}" />
<target name = "classes">
<mkdir dir = "${classes}" />
<javac
srcdir = "."
destdir = "${classes}" />
</target> <target name = "build" depends = "classes">
<exec command = "echo ${jlink}" />
<exec command = "${jlink}" />
</target> <target name = "clean">
<deltree dir = "${classes}" />
</target>
</project>What I'd really like to do is to define a task, say "buildtool" that would be composed of sub-tasks, mkdir, javac, and jlink. Of course, I'd want to define a jlink subtask in terms of exec, as I've done above. Is this possible with ant currently?
Another idea I'd like to explore is using Rhino JavaScript (big surprise) to provide scripting within a build.xml file. We could then define additional tasks dynamically in terms of scripts. Much of the currently built-in tasks could be recast in terms of scripts, where appropriate.
- Patrick --
// Patrick C. Beard // Java Runtime Enthusiast -- "Will invoke interfaces for food." // mailto:[EMAIL PROTECTED]
