> I think you've later seen that you don't since all the attributes of the > <file> are available via <sfile> as well. Using Ant 1.8.0 you can even > do a sfile.as(FileProvider.class) to get access to the java.io.File > instance itself. > > Yep, absolutely. That's why I suggested tagging a whole resource > collection later in my post.
This is the syntax that I'm looking to achieve: <spath id="filelist.classpath"> <sfilelist dir="${lib.dir}"> <sfile name="${ant.jar}" scope="compile" /> <sfile name="svntask.jar" src="/path/to/svntask-src.jar" scope="runtime" /> </sfilelist> <sfilelist dir="${target.dir}"> <sfile name="sweetened.jar" src="/path/to/sweetened-src.jar" scope="runtime" /> </sfilelist> <sfilelist dir="${alexandria.dir}"> <sfile name="${junit.jar}" scope="compile" /> </sfilelist> </spath> <spath id="javac.classpath" refid="filelist.classpath" scope="compile" /> Ideally, I could then do something like this: <javac><classpath refid="javac.classpath" /></javac> and only the jar files (defined via <sfile> instances) that are marked with scope="compile" will get passed to the javac task. I've changed <spath> to extend Union and that is working fine. The problem I'm having now is that when I echo out the javac.classpath: <echo> ${toString:javac.classpath} </echo> the getCollection() method on my spath element is called. However, the scope attribute on the spath is null. (ie: I've overrided getCollection() and this.scope is null). I'm not sure why this is getting nulled out. Also, I really can't use 1.8 features... as much as I'd like to, these build files must be able to run from within eclipse. jon --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org