在 Webapp 项目中使用 Tomcat 库 [英] Use Tomcat Library in Webapp project

查看:42
本文介绍了在 Webapp 项目中使用 Tomcat 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 Tomcat 库的 Web 应用程序.我还没有将 Tomcat 库中的 jars 复制到 web-inf/lib 目录中.

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.

现在,当我运行 ant build/testNG 类时,它会抛出错误,因为 web-inf/lib 目录下不存在相关 jar.

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.

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

Is there any way (configuration) that I can use the Tomcat library for the running the ant build / testNG classes.

提前致谢,

维维克

推荐答案

; 任务,只需提供 tomcat 库作为额外的类路径元素.

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

这篇关于在 Webapp 项目中使用 Tomcat 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆