简体   繁体   English

Eclipse错误:此项目需要迁移WTP元数据

[英]Eclipse error: This project needs to migrate WTP metadata

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: 我们在Eclipse 3.2中开始了一个Web项目,我们已经升级到Eclipse 3.4但是现在Project有错误:

"This project needs to migrate WTP metadata" “该项目需要迁移WTP元数据”

We've tried right-clicking and doing the "quick-fix" which is in fact to Migrate WTP Metadata. 我们尝试右键单击并执行“快速修复”,实际上是迁移WTP元数据。 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? 有关如何永久摆脱此错误或如何实际迁移WTP元数据的任何想法?

UPDATE: Everyone, please vote on the answer that works for you rather than adding your own answer that references a previous person's answer. 更新:每个人,请投票给你的答案,而不是添加你自己的答案,引用前一个人的答案。

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: 对我来说,解决方案是在Eclipse停止时删除以下文件:

/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/myprojectname/.markers

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. 转到项目属性>项目方面>勾选“Java”和“实用程序模块”... apply如果您的项目是从其他项目引用的,那么这是有效的。另外,您可以使用这些选项...看看哪个适用于您。

try adding this line in the .project file 尝试在.project文件中添加此行

<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 或者参考此讨论 :例如,确保.sessions/org.eclipse.wst.common.component没有重复的条目


As noted in the comment by larf311 , the actual answer in this instance was: 正如larf311的评论中所指出的,这个例子中的实际答案是:

delete the " .settings/org.eclipse.wst.common.component " file. 删除“ .settings/org.eclipse.wst.common.component ”文件。

Simple. 简单。 ;) ;)

Removing the .markers file resolved this issue for me. 删除.markers文件为我解决了这个问题。 I would upvote that solution, except that I don't have the "reputation" to do so. 我会赞成这个解决方案,除了我没有“声誉”这样做。 :( :(

This just means that the project configuration of wtp are old, or there's a conflict between modules. 这只是意味着wtp的项目配置是旧的,或者模块之间存在冲突。 go to Projct ->properties -> project facets. 转到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). 然后单击以下内容:动态Web项目ver 2.5,java 5或6以及javascript工具包(不确定是否必要)。 You will notice that there have been changes to .settings file. 您会注意到.settings文件已发生更改。 check in the new changes, and everytime someone checks out the project it should be okay 检查新的更改,每次有人检查项目,它应该没问题

删除项目,并将其从源代码管理中检出

我使用SVN,每次在新计算机上签出项目时我都有这个问题,我修复的方法是将.settings从原始位置复制到项目的新文件夹,当然使用验证

使用maven ... mvn eclipse:clean ... mvn eclipse:eclipse ...重新导入项目

In the Properties for the project I selected Project Facets. 在项目的属性中,我选择了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. 没有选择,但右侧有一条消息,表明需要选择Java 1.3或更高版本。 I selected Java 6 and then after closing the Properties window I still had to do a "Validate". 我选择了Java 6,然后在关闭“属性”窗口后,我仍然需要进行“验证”。 The problem finally disappeared. 问题终于消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM