开发者

Eclipse (Springsource Tool Suite 2.3.1) can't resolve dependencies for classes in the same package

This started happening when I upgraded my Springsou开发者_如何学JAVArce 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.


The first starting point is in eclipse to select the project from the package explorer, right click it and select

Maven > Update Project Configuration

This usually gets things back in shape.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜