java - Eclipse 2021 Maven Spring Junit 构建失败
问题描述
我正在尝试使用 Eclipse-2021-03。用 Eclipse-Neon 在 maven 下构建的东西现在失败了。在 Eclipse-2021-03 中,maven 已经解决了这个依赖:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.0.5.RELEASE</version>
<scope>test</scope>
</dependency>
这可以在下图中看到,但我收到错误“无法解析导入 org.springframework.test”:
就是想不通为什么。帮助将不胜感激。谢谢。
解决方案
答案就在这里;我在错误的地方寻找答案。显着的指标是 maven jar 旁边的灰色图标:Eclipse Maven dependency jar grayed out, can't import classes from it。
推荐阅读
- python - PyQt5:如何制作圆形应用程序?
- linux - 从注册表中删除 docker 镜像
- c++ - 在 C++ 中,为什么需要提及指针的类型?
- angular - Primeng inputMask autoClear 没有按照文档工作
- mathematical-optimization - 使用 SCS 执行 SDP 的椭球拟合期间的数值问题?
- c++ - 求解具有未知幂的模幂
- c - strcmp() 2 个变体返回不同,为什么?
- clojure - clojure中循环drop和take组合的解释
- sql - Oracle SQL-如果满足该行的条件,则从第二个表添加列
- python - 改变函数参数的类型提示装饰器