小编典典

在Webapp项目中使用Tomcat库

tomcat

我有一个使用Tomcat库的Web应用程序。我尚未将jar从Tomcat库复制到web-inf / lib目录中。

现在,当我运行ant build / testNG类时,由于相关的jar不在web-inf / lib目录下,因此它引发了错误。

有什么方法(配置)可以使用Tomcat库来运行ant build / testNG类。

提前致谢,

维维克


阅读 340

收藏
2020-06-16

共1个答案

小编典典

<testng>任务中,只需提供tomcat库作为附加的classpath元素

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