59451

Question:
I have a web application that uses the Tomcat library. I have not copied the jars from the Tomcat library into the web-inf/lib directory.
Now when I run an ant build / testNG class, it throws an error since the concerned jars are not present under the web-inf/lib directory.
Is there any way (configuration) that I can use the Tomcat library for the running the ant build / testNG classes.
Thanks in advance,
Vivek
Answer1:In the <a href="http://testng.org/doc/ant.html" rel="nofollow"><testng>
</a> task, just provide the tomcat libraries <a href="http://ant.apache.org/manual/using.html#path" rel="nofollow">as additional classpath elements</a>.
<TestNG>
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="path/to/tomcat/lib.jar"/>
</classpath>
</TestNG>