我有一个Apache Ant的构建文件,其中包含一个<javac>
命令,需要将四个特定的JAR文件放在构建classpath
中。我尝试过以下方法:
<project basedir=".." default="build_to_jar" name="Transnet Spectrum Analyzer">
<property environment="env"/>
<property name="src" value="src"/>
<property name="libsrc" value="library_sources" />
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="target" value="1.5"/>
<property name="libraries" value="./libraries"/>
<fileset dir="." id="TSA.classpath">
<include name="${libraries}/rxtx/RXTXcomm.jar" />
<include name="${libraries}/commons-logging-1.1.1.jar" />
<include name="${libsrc}/JCommon/jcommon-1.0.15.jar" />
<include name="${libsrc}/JFreeChart/jfreechart-1.0.12.jar" />
</fileset>
<target name="compile" depends="clean,init" description="compile the source " >
<echo>Compile from ${src} to ${build}</echo>
<javac destdir="${build}" source="${target}" target="${target}">
<compilerarg value="-Xlint:unchecked"/>
<src path="${src}"/>
<classpath path="TSA.classpath" />
</javac>
</target>
<!-- blah blah blah -->
</project>
...但是TSA.classpath
中指定的文件似乎没有出现。我应该如何将这些文件包含在我的类路径中呢?