tags:

views:

26075

answers:

15

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.

+3  A: 

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. ;)

VonC
Hey, if you change your answer to "delete the .settings/org.eclipse.wst.common.component" i'll choose your answer as the solution. You were close.
+17  A: 

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

Milan
+71  A: 

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.

Nuts
I have no idea what "Validate" does or why it worked, but that's the only method that really worked. Thanks!
Dave
Yep, Validate did the trick.
Chochos
That doesn't FIX it. Next time the project is checked out from source control the "This project needs to migrate WTP metadata" error appears again...
Thorbjørn Ravn Andersen
Yep, Validate did the trick.
n002213f
worked for me as well
Shervin
Validate worked wonders for me too. Thanks
msharma
I use this solution as well, but I wish I could get rid of the error permanently!
Kidburla
worked for me. Anyone knows why?
Florian
A: 

I cannot add comments yet, but the "validate" command also get rid of the error for me. In may case, my project is not a WTP project. It is managed / imported by maven. I also didn't have the WST files under .settings.

Antony Stubbs
ok - in Galileo (eclipse 3.5), the validate command has been removed?
Antony Stubbs
+2  A: 

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. :(

Michael Lamb
now you should :)
Thanks for the reputation bump!
Michael Lamb
A: 

Delete the project, and check it out of source control

That doesn't help... We have a project that does it each and every time it is checked out of source control.
Thorbjørn Ravn Andersen
A: 

Don't have a .markers file, nor find a "Validate" button. I'm clueless. :-(

Jonny
Right click on the project folder at Package Explorer
Danmaxis
I don't have this either.
day_trader
A: 

what a markers file!? I didn't find it, but I know I hate the unfriendly setting of projects in Eclipse IDE, after the each SVN starting checkout (once a month or three)

A: 

I didn't need WTP so I removed all references to WTP in the .project file.

Paul
+5  A: 

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.

marius
+1 this solved my particular problem, thank you very much.
fretje
A: 

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

Cesar Olvera
A: 

Below answer worked for me. "delete the ".settings/org.eclipse.wst.common.component" file."

Keshav
A: 

Use maven ... mvn eclipse:clean ... mvn eclipse:eclipse ... reimport the project

mortsahl
A: 

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

Moataz Elmasry
A: 

the

<nature>org.eclipse.wst.common.project.facet.core.nature</nature>

worked. I have no reputation yet for vote.

Il'ya Tret'yakov