Eclipse(Springsource Tool Suite 2.3.1)无法解析同一包中类的依赖关系
当我将 Springsource Tool Suite 从 2.3 升级到 2.3.1 时,这种情况开始发生。基本上,每当我做任何事情,例如打开文件、更改文件等时,我都必须进行清理。当我在命令行上执行 mvn
命令时,一切正常,这让我相信 Eclipse 正在错误的位置查找已编译的代码或类似的内容,尽管在这一点上这完全是迷信。
示例:我对 com.foo.mypackage.MyClass 进行了更改。突然,一堆执行 MyClass
的测试得到了红色 x - 未找到类!
在 src/main/test 中:
com.foo.DbUnitTest
com.foo.mypackage.FooTest extends DbUnitTest
DbUnitTest 获取未找到的类。我打扫干净了,一切都很好。我碰了一些东西,它又坏了:(。我真的不知道从哪里开始解决这个问题。
This started happening when I upgraded my Springsource Tool Suite from 2.3 to 2.3.1. Essentially whenever I do anything, such as open a file, change a file, etc, I have to do a clean. Everything works fine when I do mvn
commands on the command line, which leads me to believe that Eclipse is looking in the wrong place for compiled code or something along those lines, although that is entirely superstitious at this point.
Example: I make a change to com.foo.mypackage.MyClass
. Suddenly a bunch of tests that excercise MyClass
get the red x - for class not found!
In src/main/test
:
com.foo.DbUnitTest
com.foo.mypackage.FooTest extends DbUnitTest
DbUnitTest gets a class not found. I do a clean, and everything is fine. I touch something, and it breaks again :(. I don't really know where to begin on how to troubleshoot this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个起点是在 Eclipse 中从包资源管理器中选择项目,右键单击它并选择
“这通常会让事情恢复原样”。
The first starting point is in eclipse to select the project from the package explorer, right click it and select
This usually gets things back in shape.