ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <>
Subject Re: Extending path
Date Thu, 10 Jun 2010 23:00:11 GMT
Ok, new question. Say I have a build.xml that looks like this:

    <spath id="filelist.classpath" scope="unit">
        <sfilelist dir="${lib.dir}">
            <sfile name="${ant.jar}" scope="compile" />
            <sfile name="${ant-googlecode.jar}" scope="runtime" />
            <sfile name="svntask.jar" scope="runtime" />
        <sfilelist dir="${target.dir}">
            <sfile name="sweetened.jar" src="src" scope="runtime" />
        <sfilelist dir="${alexandria.dir}">
            <sfile name="${junit.jar}" scope="unit" />

    <spath id="javac.classpath" scope="compile" refid="filelist.classpath" />

        javac.classpath: ${toString:javac.classpath}

spath extends Union.

When the ${toString} is called, the spath.getCollection() method is
called by ant. At that point, though, ant is calling the
getCollection() method on the spath instance of filelist.classpath and
not on the instance of javac.classpath. This is bad because the
'scope' of the javac.classpath should override the 'scope' of the

I guess one option would be to implement my own refid type system
within my spath, but I was hoping that I could just use ant's.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message