You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Scott Purcell <sp...@vertisinc.com> on 2006/03/03 16:03:07 UTC

Complete Newbie Need Hand With Classpath

I am using struts so I was able to take the struts-blank starter
build.xml file as a basis.

 

I am creating a web-app here is my structure:

 

Myapp

  Build.xml

  WEB-INF/src

  WEB-INF/lib

  WEB-INF/classes

 

Inside the above lib directory are libs that could be included with the
webapplication if I create a war file.

I need to include a servlet.jar while compiling, but not include it in
the war file.

 

Also I would like to be able to point to the lib directory and have it
read all the .jar files.

 

 

I have done this:

<property name="source.root" value="WEB-INF/src"/>

  <property name="class.root" value="WEB-INF/classes" />

  <property name="lib.dir" value="WEB-INF/lib" />

 

<path id="project.class.path">

     <!-- include jars in the project library directory -->

     <fileset dir="${lib.dir}">

       <include name="**/*.jar" />

     </fileset>

  </path>

 

How do I include servlet.jar which will be somewhere like
/usr/local/servlet.jar on my dev box?

Also, how does it know that other friends may live in the
/WEB-INF/classes directory

 

Sincerely

Scott