Eclipse error: This project needs to migrate WTP metadata
JavaEclipseEclipse WtpJava Problem Overview
We started a Web Project in Eclipse 3.2 a ways back and we've since upgraded to Eclipse 3.4 but now the Project has the error:
"This project needs to migrate WTP metadata"
We've tried right-clicking and doing the "quick-fix" which is in fact to Migrate WTP Metadata. Unfortunately nothing happens and the error remains.
We can delete that error from the Problems and everything works as it should, however, every time we re-import the project from source control, the error re-appears. Any ideas on how to permanently get rid of this error or how to ACTUALLY migrate WTP metadata?
UPDATE: Everyone, please vote on the answer that works for you rather than adding your own answer that references a previous person's answer.
Java Solutions
Solution 1 - Java
The above solution works fine but it creeps up again and again. An easier solution is to right click on the concerned project in Eclipse and choose Validate.
Solution 2 - Java
For me, none of these worked. The solution for me was deleting the following file while Eclipse was stopped:
/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/myprojectname/.markers
Solution 3 - Java
Here is another thing you could try, only this worked for me :(
Go to project properties > Project facets > there tick "Java" and "Utility Module" ... apply This works if your project is referenced from other projects ..otherwise you could play with those options ...see which one works for you.
Solution 4 - Java
try adding this line in the .project
file
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
Or refer to this discussion: for instance, make sure there is no duplicate entries in .sessions/org.eclipse.wst.common.component
As noted in the comment by larf311, the actual answer in this instance was:
> delete the ".settings/org.eclipse.wst.common.component
" file.
Simple. ;)
Solution 5 - Java
Removing the .markers file resolved this issue for me. I would upvote that solution, except that I don't have the "reputation" to do so. :(
Solution 6 - Java
This just means that the project configuration of wtp are old, or there's a conflict between modules. go to Projct ->properties -> project facets. Then click the following: dynamic web project ver 2.5, java 5 or 6 and javascript toolkit (not sure if its necessary). You will notice that there have been changes to .settings file. check in the new changes, and everytime someone checks out the project it should be okay
Solution 7 - Java
Delete the project, and check it out of source control
Solution 8 - Java
I use SVN and every time I checkout the project in a new computer I have this problem, the way I fixed is to copy the .settings from the original location to the new folder of the project, of course use validation
Solution 9 - Java
Use maven ... mvn eclipse:clean ... mvn eclipse:eclipse ... reimport the project
Solution 10 - Java
In the Properties for the project I selected Project Facets. None were selected, but there was a message on the right hand side indicating that Java 1.3 or later needed to be selected. I selected Java 6 and then after closing the Properties window I still had to do a "Validate". The problem finally disappeared.