Recovering from an invalid state in m2eclipse
On rare occasions, your projects may get into an invalid state. When this happens, you may notice one or more of the following symptoms:
- Inability to run the project on the server.
- Inability to build the project.
- Unexpected error messages.
This generally happens when something causes the Maven-related metadata in m2eclipse to get into an invalid state. There are a few things you can try to resolve this:
- Ensure all necessary projects are opened in the workspace (ie, web and deploy projects)
- Refresh all affected projects (right-click > Refresh on a project or group of projects)
- Update Maven configuration for affected projects (Right-click on a project > Maven > Update Project configuration)
- Clean the Server (right-click on Server > Clean)
If those fail to resolve the issue, your next step should be to create a new workspace (File > Switch Workspace) and then re-checkout the projects from source control. If this fails to get your project into a good state, post on the forums or come talk to a member of the Java Stack team.