Use Tomcat Library in Webapp project

送分小仙女□ 提交于 2020-01-05 07:43:14

问题


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


回答1:


In the <testng> task, just provide the tomcat libraries as additional classpath elements.

<TestNG>
    <classpath>
        <pathelement path="${classpath}"/>
        <pathelement location="path/to/tomcat/lib.jar"/>
    </classpath>
</TestNG>


来源:https://stackoverflow.com/questions/7109599/use-tomcat-library-in-webapp-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!