: Adding this path element might work:
: ${ant.library.dir}/junit.jar
Ah HA! ... see, i didn't even know that property existed, it's not in the
list of built-in properties...
http://ant.apache.org/manual/using.html#built-in-props
...probably becuase it's acctually just a system property set by the ant
wrapper script.
we wouldn't want to use the explicit path with "junit.jar" in it because
people might name the jar soemthing else (with a version number perhaps)
but we can certainly use that property in a fileset to get all the jars.
: (I could not make that work here. For some reason on my machine
: ${ant.library.dir} points to /usr/share/ant/lib even though the environment
: variable ANT_HOME is set to ~/ant/apache-ant-1.6.5, and $ANT_HOME/bin
: is on the shell PATH.)
that's strange ... now that i'm poking arround in the ant wrapper script,
i can't see any obvious way that ant.library.dir wouldn't point to
ANT_HOME/lib ... acctually, the property ${ant.home} gets set by the ant
wrapper script as well, try echoing it and ${ant.version} from a build.xml
file and make sure your using the instance of ant you think you are.
This is what i've currently got in my local solr build.xml, and it seems
to be working ok...
<path id="javadoc.classpath">
<path refid="compile.classpath"/>
<!-- aparently ant.library.dir isn't allways set right? -->
<fileset dir="${ant.home}/lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${ant.library.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
...anyone see any problems with that?
: Another way might be to set the build.sysclasspath property to "last", but
: that has the disadvantage of adding more things to the classpath.
Interesting, i've never seen that property used before...
http://ant.apache.org/manual/sysclasspath.html
...if i'm understanding that correctly, using "last" adds everything to
the classpath that i added using ${ant.home}/lib and ${ant.library.dir},
but it would also add any other classes that might have been in the users
$ENV{CLASSPATH} when running ant correct?
Using ${ant.home}/lib and ${ant.library.dir} already feels a bit dirty to
me, adding build.sysclasspath=last seems like overkill.
-Hoss