pom.xml引入新的依赖后报错:Description Resource Path Location Type Archive for required library: 'C:/Users/use...
程序员文章站
2022-04-28 09:30:52
...
- 问题产生的情景:当配置好的pom.xml中再次添加新的依赖,此时报错
Description Resource Path Location Type Archive for required library:
'C:/Users/username/.m2/repository/org/apache/httpcomponents/httpcore-
nio/4.4.1/httpcore-nio-4.4.1.jar' in project 'projectName' cannot be read or is
not a valid ZIP file projectName
- 原因:已经引入的依赖和新添加的依赖在httpcore-nio-4.4.1.jar 上面产生冲突
- 解决
To fix issues like that, let Maven download the files again:
Delete the folder D:/mypath/.m2/repository/javax/transaction/jta
Run Maven with -U so it tries broken downloads again.
That should try to download the file again and clean up any "residue" in your local repository.
If Eclipse still complains that the JAR file is corrupt:
Refresh your project