Hi, I'd like to specify the classpath an <ant> task will use. As far as I can see in the documentation, that's not possible. Unfortunately some other ant tasks rely on the system classpath and won't run if it's incomplete. Shouldn't a nested <classpath> element be created ?
You are supposed to be able to create your own path elements such as <path id="build.classpath"> ... </path> and then pass that through using inheritRefs="true" or using a nested <reference id="build.classpath">. However, that doesn't seem to work. However, stuff in $ANT_HOME/lib is available by default, so there is no particular reason to add the classpath attribute, but there is reason to make the existing constructs work properly. Jake
This is not practical due to the fact that the <ant> task runs in the same VM as the invoking Ant process. You should be able to achieve this behavior using a <java fork="true">.
Then why not create a classpath element that is an implicit fork ?
Other than the overhead/maintenance involved in creating and keeping up-to-date the code needed to launch Ant, and the fact that an alternative exists, none.
No arguments for over two years ...