++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Please read the disclaimer at the bottom of this e-mail. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Hi, I have a task (run-jostraca) in my ant script that calls a Java class (org.jostraca.Jostraca) that in turn generates a java file and compiles it. The classpath specified in the target includes everything that is required to compile this generated class successfully but i am still getting a compile error as a particular class was not found. The class it is complaining exist in <pathelement location = "${test.classes.dir}"/>. It appears that ant ignores the classpath when it compiles the generated class. But if i run this target with system classpath (in windows environment option) set to correct directory, it works fine. Could anybody please suggest the soultions. Here is the code snippet: <path id = "build.classpath"> <pathelement location = "${build.jar.dir}/lchml-reporting.jar"/> <pathelement location = "${csf.lib.dir}/csf.jar"/> <pathelement location = "${io.api.jar}"/> <pathelement location = "${thirdparty.lib.dir}/jaxen-core.jar"/> <pathelement location = "${thirdparty.lib.dir}/log4j.jar"/> <pathelement location = "${thirdparty.lib.dir}/saxpath.jar"/> <pathelement location = "${thirdparty.lib.dir}/xercesImpl.jar"/> <pathelement location = "${thirdparty.lib.dir}/xml-apis.jar"/> <pathelement location = "${alternate.thirdparty.lib.dir}/junit/junit.jar"/> </path> <target name = "run-jostraca" description = "Run jostraca (not yet working)"> <java classname = "org.jostraca.Jostraca" fork = "yes"> <echo message="${test.classes.dir}"/> <classpath> <path refid = "build.classpath"/> <pathelement location = "${jostraca.dir}"/> <pathelement location = "${deployment.classes.dir}"/> <pathelement location = "${test.classes.dir}"/> <pathelement location = "${tool.lib.dir}/jostraca.jar"/> <pathelement location = "${thirdparty.lib.dir}\log4j.jar"/> </classpath> <arg value = "-G"/> <arg value = "-f"/> <arg value = "${test.conf.dir}/jostraca/system.conf"/> <arg value = "${test.jostraca.dir}/lchmlTest.jtm"/> <arg value = "-v"/> <arg value = "-B"/> <arg value = "-a"/> <arg value = "${test.conf.dir}/TestCase.xml"/> <jvmarg value = "-Xmx256m"/> <!--jvmarg value="-verbose"/--> <jvmarg value = "-Dconfiguration.dir=${test.conf.dir}"/> <jvmarg value = "-Ddata.dir=${test.data.dir}"/> <jvmarg value = "-Ddtomapping.file=DTOMapping.xml"/> </java> </target> ********************************************************************** This email is intended for the named recipient(s) only. Its contents are confidential and may only be retained by the named recipient(s) and may only be copied or disclosed with the consent of LCH.Clearnet Limited. If you are not an intended recipient please delete this e-mail and notify [EMAIL PROTECTED] The contents of this email are subject to contract in all cases, and LCH.Clearnet Limited makes no contractual commitment save where confirmed by hard copy. LCH.Clearnet Limited accepts no liability, including liability for negligence, in respect of any statement in this email. LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High Street, London EC3N 1EA. Recognised as a Clearing House under the Financial Services & Markets Act 2000. Reg in England No.25932 Telephone: +44 20 7426 7000 Internet: http://www.lchclearnet.com **********************************************************************