記一個mvn奇怪錯誤: Archive for required library: 'D:/mvn/repos/junit/junit/3.8.1/junit-3.8.1.jar' in project 'xxx' cannot be read or is not a valid ZIP file


我的maven 項目有一個紅色感嘆號, 而且Problems 存在 errors :

Description Resource Path Location Type
Archive for required library: 'D:/mvn/repos/junit/junit/3.8.1/junit-3.8.1.jar' in project 'xxx' cannot be read or is not a valid ZIP file ktb-mgr Maven Webapp Build path Build Path Problem

junit-3.8.1.jar 是明明存在的啊! 而且本地mvn 也存在啊! 為什么還是這樣的錯誤, Project -> Clean 后還是一樣啊!

mvn clean compile 也是 BUILD SUCCESS, 為什么。。。?

等等, 好像有所不對。。。

junit 里面竟然是空的! 。。。

我明白了, mvn clean compile 會 BUILD SUCCESS 是因為 我項目中沒有用到 junit。。

重命名 junit jar , 再次mvn clean compile:

結果:

eclipse中 再次 Project -> Clean , all right !


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM