I am new to ANT, and am trying to setup a build file that will take the JAR files from my project lib directory, and allow my compiler to utilize the jar files when I run an Ant target. My build.xml file is in the root of my web app project directory, and I need to include the servlet.jar file when I compile my java code. Here is my basic build.xml file
<project name="MVC" default="all" basedir=".">
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="lib.dir" value="lib"/>
<target name="merge" description="Builds the entire project">
<echo>Doing merge</echo>
<javac srcdir="${src.dir}" destdir="${build.dir}"/>
</target>
</project>
How do I get the servlet.jar file, which is in my lib directory, to be utilized when calling the "merge" target? There will be many other jar files for other projects, so I don't want to have to add them to my classpath in my environmental variables.
Thanks
Start Free Trial