我的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 !