0
我運行一個測試,讀取web.xml文件如下:詹金斯找不到web.xml中的IntelliJ,但可以
new URL(
new ClassPathResource("com/jettyrule/testwebapp/web-inf/web.xml")
.getURL(), "..");
我的測試中通過的IntelliJ但是當我在詹金斯跑,我得到這樣的:
java.io.FileNotFoundException:類路徑資源 [com/jettyrule/testwebapp/web-inf/web.xml]無法解析爲URL ,因爲它不存在。
我檢查了Jenkins上的項目內容,並且web.xml文件在那裏。任何人都知道詹金斯爲何與當地不同?
我唯一能想到的是包是com/jettyrule/testwebapp/WEB-INF(大寫)。應該這樣嗎?