Wednesday, February 06, 2013

Eclipse Juno "Updating Maven Project" error

During my current project, quite often I'll see a red X on my maven project top level on eclipse Juno when something changed. When that appeared, I'll do a right click and select "Maven -> Update Project." That fixed the issue. But before it did, I'll see an error message popped-up with the following message:
An internal error occurred during: "Updating Maven Project". Unsupported IClasspathEntry kind=4
So I looked to see if there's a "common cure" for this and found:

http://stackoverflow.com/questions/11832647/an-internal-error-occurred-during-updating-maven-project

Essentially the proposed fix is (Adjusted for Juno with m2e plugin):

1. Right-click on the project, select Maven -> Disable Maven Nature.
2. Open a terminal window, go to your project folder and run "mvn eclipse:clean"
3. Right click on the Project and select “Configure -> Convert to Maven Project”

I'll have to see in a few cycles, if this will fix the original issues that caused the first red X mark to appear in the first place.