E
El Durango
I am writing an ant script which should set the classpaths for the necessary
Jar files.
Here is what I have:
<?xml version="1.0" encoding="UTF-8"?>
<project name="test" default="compile" basedir=".">
<property name="src" value="."/>
<property name="build" value="build"/>
<property name="lib" value="lib"/>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code -->
<javac srcdir="${src}" destdir="${build}"/>
<classpath>
<pathelement location="${baselib}\xercesImpl.jar" />
<pathelement location="${lib}\xmlParserAPIs.jar" />
<pathelement location="${lib}\xml-apis.jar" />
<pathelement location="${lib}\servlet-api.jar" />
<pathelement
location="${lib}\commons-fileupload-1.0.jar" />
</classpath>
</target>
</project>
However this is not working, as it fails with unresolved symbol errors.
Can anyone let me know how I can set classpaths using Ant, I seem to be
doing it the wrong way.
thanks.
Jar files.
Here is what I have:
<?xml version="1.0" encoding="UTF-8"?>
<project name="test" default="compile" basedir=".">
<property name="src" value="."/>
<property name="build" value="build"/>
<property name="lib" value="lib"/>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code -->
<javac srcdir="${src}" destdir="${build}"/>
<classpath>
<pathelement location="${baselib}\xercesImpl.jar" />
<pathelement location="${lib}\xmlParserAPIs.jar" />
<pathelement location="${lib}\xml-apis.jar" />
<pathelement location="${lib}\servlet-api.jar" />
<pathelement
location="${lib}\commons-fileupload-1.0.jar" />
</classpath>
</target>
</project>
However this is not working, as it fails with unresolved symbol errors.
Can anyone let me know how I can set classpaths using Ant, I seem to be
doing it the wrong way.
thanks.