0

I'm getting compilation errors when I open a specific class file in Eclipse. However, the class doesn't show a compilation error icon in the Project Explorer. I have enabled dependency management by right-clicking the project and using the Maven menu.

I'm using Eclipse 3.7.1 and Maven 2.2.1.

looks like this

Brian
  • 2,535
  • 2
  • 18
  • 13
  • place a screenshot, that will be helpful for others – fmucar Apr 26 '12 at 14:37
  • It looks like a form of this question was already answered [here](http://stackoverflow.com/a/7160614/366695). Thanks Kevin Wong and Michael-O. – Brian Apr 26 '12 at 14:37

2 Answers2

1

Use Package Explorer, not Project Explorer. It's a lot more reliable for Java projects.

Sean Patrick Floyd
  • 292,901
  • 67
  • 465
  • 588
1

I've not seen this problem before, but I'd try performing the obligatory clean and build all on the project. I suggest making sure the following options are checked in Preferences -> Java -> Compiler -> Building:

  • Scrub output folders when cleaning projects
  • Rebuild class files modified by others

There are several good suggestions in the question linked by bdill, specifically to try updating your project configuration from the pom.

Community
  • 1
  • 1
Nate
  • 557
  • 3
  • 8