Eclipse:类路径引用的归档文件不存在
My Eclipse 是 Indigo Java classic。
我有一个java项目,它将mojito-all作为依赖项。pom.xml:
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
运行,一切都还好。然后我解决了Eclipse中的所有依赖关系。mvn clean install
mvn eclipse:eclipse
当我尝试在日食中运行Junit时,它没有运行并给我这个错误:
'Launching YourTest' has encountered a problem.
The archive: /home/shengjie/.m2/repository/org/mockito/mockito-all/1.9.5.jar which is referenced by the classpath, does not exist.
我的项目pom.xml声称它依赖于mockito-all 1.8.5,我不确定1.9.5的引用来自哪里。有什么想法吗?
==编辑==
$ mvn dependency:tree | grep mockito
[INFO] +- org.mockito:mockito-all:jar:1.8.5:test
[INFO] \- org.powermock:powermock-api-mockito:jar:1.4.12:test
[INFO] \- org.powermock:powermock-api-mockito:jar:1.4.12:test
[INFO] +- org.mockito:mockito-all:jar:1.8.5:test (version managed from 1.9.0)
[INFO] | +- org.mockito:mockito-all:jar:1.8.5:test (version managed from 1.9.5; scope managed from compile)
[INFO] | +- org.mockito:mockito-all:jar:1.8.5:test (version managed from 1.9.5; scope managed from compile)
[INFO] \- org.powermock:powermock-api-mockito:jar:1.4.12:test
[INFO] +- org.mockito:mockito-all:jar:1.8.5:test
[INFO] +- org.powermock:powermock-api-mockito:jar:1.4.12:test
[INFO] | +- org.mockito:mockito-all:jar:1.8.5:test (version managed from 1.9.5; scope managed from compile)