【发布时间】:2017-05-04 18:15:44
【问题描述】:
我正在运行一个读取 web.xml 的测试,如下所示:
new URL(
new ClassPathResource("com/jettyrule/testwebapp/web-inf/web.xml")
.getURL(), "..");
我的测试在 Intellij 中通过了,但是当我在 Jenkins 中运行时,我得到了这个:
java.io.FileNotFoundException:类路径资源 [com/jettyrule/testwebapp/web-inf/web.xml] 无法解析为 URL 因为它不存在。
我已经在 Jenkins 上检查了项目内容,并且 web.xml 文件就在那个位置。有谁知道为什么 Jenkins 与本地不同?
我唯一能想到的是包是com/jettyrule/testwebapp/WEB-INF(大写)。这有关系吗?
【问题讨论】:
标签: java jenkins jetty web.xml