Eclipse 错误:该项目需要迁移 WTP 元数据
我们之前在 Eclipse 3.2 中启动了一个 Web 项目,后来升级到 Eclipse 3.4,但现在项目出现错误:
“此项目需要迁移 WTP 元数据”
我们尝试右键单击并执行“快速-修复”,这实际上是为了迁移 WTP 元数据。 不幸的是,什么也没发生,错误仍然存在。
我们可以从问题中删除该错误,一切都会正常工作,但是,每次我们从源代码管理重新导入项目时,错误都会重新出现。 关于如何永久消除此错误或如何实际迁移 WTP 元数据有什么想法吗?
更新:大家,请对适合您的答案进行投票,而不是添加引用前人答案的自己的答案。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
上面的解决方案工作正常,但它一次又一次地爬行。 一个更简单的解决方案是在 Eclipse 中右键单击相关项目并选择“验证”。
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.
对我来说,这些都不起作用。
我的解决方案是在 Eclipse 停止时删除以下文件:
For me, none of these worked.
The solution for me was deleting the following file while Eclipse was stopped:
这是您可以尝试的另一件事,只有这对我有用:(
转到项目属性>项目方面>勾选“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.
尝试在
.project
文件中添加此行或参考 此讨论:例如,确保
.sessions/org.eclipse.wst.common.component
中没有重复的条目,如 larf311,本例中的实际答案是:
简单的。 ;)
try adding this line in the
.project
fileOr 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:
Simple. ;)
删除 .markers 文件为我解决了这个问题。 我会赞成该解决方案,但我没有这样做的“声誉”。 :(
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. :(
这仅仅意味着wtp的项目配置是旧的,或者模块之间存在冲突。 转到项目 -> 属性 -> 项目方面。 然后单击以下内容:动态 Web 项目版本 2.5、java 5 或 6 和 javascript 工具包(不确定是否有必要)。 您会注意到 .settings 文件已发生更改。 检查新的更改,每次有人检查该项目时都应该没问题
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
删除项目,并将其从源代码管理中检出
Delete the project, and check it out of source control
我使用SVN,每次在新计算机上签出项目时都会遇到此问题,我解决的方法是将.settings从原始位置复制到项目的新文件夹,当然使用验证
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
使用 maven ... mvn eclipse:clean ... mvn eclipse:eclipse ... 重新导入项目
Use maven ... mvn eclipse:clean ... mvn eclipse:eclipse ... reimport the project
在项目的属性中,我选择了 Project Facets。 没有选择,但右侧有一条消息表明需要选择Java 1.3或更高版本。 我选择了 Java 6,然后在关闭“属性”窗口后,我仍然需要执行“验证”。 问题终于消失了。
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.