ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Sawyer <>
Subject Javac Problem
Date Fri, 03 Aug 2001 09:55:50 GMT

I'm using the version of Ant that comes with netbeans 3.2, and I'm using a
slightly modified version of build.xml that came from the tomcat
documentation.  I've set up my directory structure to match those docs, with
a root directory containing src, lib, etc and web, and then having a
deployment directory in the tomcat/webapps directory.

The problem I'm having is that when I do a compile, the compiler doesn't
pick up the jars that I have in WEB-INF/lib, even though that directory is
on the classpath for the javac.  The compile fails because if can't find
jdom, where jdom.jar is in the WEB-INF/lib directory.  Am I missing
something obvious?

I've included my build.xml at the end of this mail.



<?xml version="1.0" encoding="UTF-8"?>
<!-- A "project" describes a set of targets that may be requested
     when Ant is executed.  The "default" attribute defines the
     target which is executed if no specific target is requested,
     and the "basedir" attribute defines the current working directory
     from which Ant executes the requested task.  This is normally
     set to the current working directory.
<project basedir="c:\JavaDev\Toolkit" default="compile" name="Web Toolkit">

  <property name="" value="toolkit"/>
  <property name="tomcat.home" value="/jakarta-tomcat-3.2.1"/>
  <property name="deploy.home" value="${tomcat.home}/webapps/${}"/>
  <property name="dist.home" value="${deploy.home}"/>
  <property name="dist.src" value="${}.jar"/>
  <property name="dist.war" value="${}.war"/>
  <property name="javadoc.home" value="${deploy.home}/javadoc"/>

  <target name="prepare">
    <mkdir dir="${deploy.home}"/>
    <copy todir="${deploy.home}">
      <fileset dir="web"/>
    <mkdir dir="${deploy.home}/WEB-INF"/>
    <copy file="etc/web.xml" tofile="${deploy.home}/WEB-INF/web.xml"/>
    <mkdir dir="${deploy.home}/WEB-INF/classes"/>
    <mkdir dir="${deploy.home}/WEB-INF/lib"/>
    <copy todir="${deploy.home}/WEB-INF/lib">
      <fileset dir="lib"/>
    <mkdir dir="${javadoc.home}"/>

  <target name="clean">
    <delete dir="${deploy.home}" verbose="true"/>

  <target depends="prepare" name="compile">
debug="false" deprecation="off" destdir="${deploy.home}/WEB-INF/classes"
optimize="off" srcdir="src" verbose="false"/>
    <copy todir="${deploy.home}/WEB-INF/classes">
      <fileset dir="src" includes="**/*.properties"/>

  <target depends="prepare" name="javadoc">
    <javadoc destdir="${javadoc.home}" packagenames="*" sourcepath="src"/>

  <target depends="clean,prepare,compile,javadoc" name="all"/>

  <target depends="prepare,compile" name="dist">
    <jar basedir="." jarfile="${dist.home}/${dist.src}"/>
    <jar basedir="${deploy.home}" jarfile="${dist.home}/${dist.war}"/>


This e-mail and its attachments are for the use of the addressee only.
It may contain information that is legally privileged, confidential and 
exempt from  disclosure.  It is not a contract, and prices, data 
and other information are not warranted as to completeness or accuracy.  
Any comments or statements  made herein do not necessarily 
reflect those of PanCredit Systems Limited. If you are not the intended 
recipient you must not copy, distribute or disseminate this e-mail 
or attachments to anyone other than the addressee.  
If you receive this communication in error please advise us by telephone 
at once. 
PanCredit Systems Limited 
Tel:	+44 113 250 0260 
Fax:	+44 113 250 0621 

View raw message