You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ma...@ftms.fr on 2001/10/04 09:53:39 UTC

deployment problem with ant: jar files in lib not found

hi,

I came across the folowing problem:
as long as I developped my own classes (in src/package/Myclass.java)
the build process went ok. However, when I tryed to integrate forein
libraries, actually xml jars (in lib/*.jar), the compilation fails
whenever Myclass uses classes from these jars:

jboss@garfield> ./build.sh all
Searching for build.xml ...
Buildfile: /home/jboss/dev/eai/webapp/build.xml

clean:
   [delete] Deleting directory /home/jboss/tomcat/webapps/eai

prepare:
    [mkdir] Created dir: /home/jboss/tomcat/webapps/eai
     [copy] Copying 7 files to /home/jboss/tomcat/webapps/eai
    [mkdir] Created dir: /home/jboss/tomcat/webapps/eai/WEB-INF
     [copy] Copying 1 files to /home/jboss/tomcat/webapps/eai/WEB-INF
    [mkdir] Created dir: /home/jboss/tomcat/webapps/eai/WEB-INF/classes
    [mkdir] Created dir: /home/jboss/tomcat/webapps/eai/WEB-INF/lib
     [copy] Copying 3 files to /home/jboss/tomcat/webapps/eai/WEB-INF/lib
********** The jars are copied to WEB-INF/lib here
*********************************
    [mkdir] Created dir: /home/jboss/tomcat/webapps/eai/javadoc

compile:
    [javac] Compiling 2 source files to
/home/jboss/tomcat/webapps/eai/WEB-INF/classes
    [javac]
/home/jboss/dev/eai/webapp/src/com/orange/eai/presentation/Menu.java:44:
cannot resolve symbol
    [javac] symbol  : class XMLReader  
    [javac] location: class com.orange.eai.presentation.Menu
    [javac]         XMLReader xmlReader = null;
    [javac]         ^
    [javac] 1 error

the compile target in build.xml looks like:


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

I tried to add {deploy.home}/WEB-INF/lib to the classpath attribute before
or after
${deploy.home}/WEB-INF/classes but the result is the same...

any help would be greatly appreciated.

maurice

-------------------------------------------------------------------
Maurice Szmurlo --- ORANGE France --- SG/DSI/SIMBAD/AT&P 
65-67, Avenue Vladimir Illich LĂ©nine, 94110 ARCUEIL