eclipse 更新项目时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1340999/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:58:55  来源:igfitidea点击:

Error while updating a project

eclipse

提问by rayimag

I get the following error when trying to "update" my eclipse project :

尝试“更新”我的 eclipse 项目时出现以下错误:

failed due to an internal error (took 0:00.337)
   Error: Problem writing resource 
   '/sspaceex/src/PLWL_implementations/CVS/Template'. 
   A resource already exists on disk 
   '/home/ray/workspace2/sspaceex/src/PLWL_implementations/CVS/Template'.
   Error: A resource already exists on disk 
   '/home/ray/workspace2/sspaceex/src/PLWL_implementations/CVS/Template'.
   ***

Any idea why this error and how to get rid of this?

知道为什么会出现这个错误以及如何摆脱这个错误吗?

回答by VonC

Error: Problem writing resource 
'/sspaceex/src/PLWL_implementations/CVS/Template'.  
A resource already exists on disk 
'/home/ray/workspace2/sspaceex/src/PLWL_implementations/CVS/Template'

Try to close as many active process as possible to check if another application does not "block" that resource.
As Narayansuggests in the comments, if it exists, check if you can delete it manually (outside eclipse) before attempting another refresh in eclipse.

尝试关闭尽可能多的活动进程以检查另一个应用程序是否没有“阻止”该资源。
正如Narayan在评论中建议的那样,如果它存在,请在尝试在 eclipse 中再次刷新之前检查是否可以手动删除它(在 eclipse 之外)。

The server reported an error while performing the "cvs update" command:

服务器在执行“ cvs update”命令时报告错误:

sspaceex: cvs update: nothing known about `doxygen/htmlclasscontinuous__sets_1_1sequence__transform__coll__graph.md5'

That should mean that the resource is removed from the file system, but not removed from CVS (i.e. on CVS server, an entry exists for this resource).
That is consistent with the failed update which was unable to write in that directory.

这应该意味着该资源已从文件系统中删除,但并未从 CVS 中删除(即在 CVS 服务器上,该资源存在一个条目)。
这与无法写入该目录的失败更新一致。

回答by ikube

Doh,

多,

I had to updated project configuration. This created the folder that Eclipse didn't like. Then close the project. Then reopen it. Then update project configuration again. Do a little dance and song, and violla!

我不得不更新项目配置。这创建了 Eclipse 不喜欢的文件夹。然后关闭项目。然后重新打开它。然后再次更新项目配置。做一点舞蹈和歌曲,还有中提琴!

In that order.

以该顺序。

Cheers, M

干杯,M

回答by Zach

I hit this issue due to resource wildcard exclusions in my project. My project and CVS repository contains numerous file types that I never edit (for example, *.asm assembly files). To reduce workspace view clutter and to make searches faster, I had excluded these file types from my project when I had originally created it.

由于我的项目中排除了资源通配符,我遇到了这个问题。我的项目和 CVS 存储库包含许多我从未编辑过的文件类型(例如,*.asm 程序集文件)。为了减少工作区视图的混乱并加快搜索速度,我在最初创建项目时已将这些文件类型从我的项目中排除。

From what I can tell, this causes Eclipse/CVS to think it needs to add all these "missing" files to my project when I attempt to do an update (as evident in the incoming changes in the Team Synchronizing view). When I removed the resource filter from my project, the update process was able to complete.

据我所知,这会导致 Eclipse/CVS 认为在我尝试进行更新时需要将所有这些“丢失”的文件添加到我的项目中(在 Team Synchronizing 视图中的传入更改中很明显)。当我从我的项目中删除资源过滤器时,更新过程能够完成。

This is sort of a pain because I have to choose between the two, or I have to keep adding and removing these filters based on when I want to perform an update.

这有点痛苦,因为我必须在两者之间做出选择,或者我必须根据我想要执行更新的时间不断添加和删除这些过滤器。

回答by anushr

I had this same issue. For me, it had to do with the fact that eclipse was out of sync with the file system. I just had to refresh the project (select the project, then hit F5) and the "update" was okay.

我有同样的问题。对我来说,这与 eclipse 与文件系统不同步的事实有关。我只需要刷新项目(选择项目,然后按 F5),“更新”就可以了。

回答by Hamid

I had to manually delete the resource, then refresh the project, then update, and it worked.

我不得不手动删除资源,然后刷新项目,然后更新,它就起作用了。

Note: I have Build Automaticallyturned off, it might be that the refresh will cause an automatic rebuild that will create the resource again, so make sure there is no build done between deleting, refreshing, and updating.

注意:我已经关闭了自动构建,可能是刷新会导致自动重建,再次创建资源,所以请确保在删除、刷新和更新之间没有完成构建。

回答by Aaron Digulla

Eclipse is confused because a file exists that shouldn't be there. Close the project and synchronize again and it should go away.

Eclipse 很困惑,因为存在不应该存在的文件。关闭项目并再次同步,它应该会消失。

[EDIT] cvs update: nothing known about '...'means that Eclipse believes that this file is under CVS control and the CVS server says "I have no idea what you're talking about".

[编辑]cvs update: nothing known about '...'意味着 Eclipse 认为这个文件在 CVS 控制之下,CVS 服务器说“我不知道你在说什么”。

Reasons can be that your CVS server got corrupted, somehow, of that the contents of the files CVS/Entriesand CVS/Entries.Extrais wrong (Eclipse records what is under CVS control in these files).

原因可能是您的 CVS 服务器以某种方式损坏了文件内容CVS/Entries并且CVS/Entries.Extra是错误的(Eclipse 在这些文件中记录了 CVS 控制下的内容)。

I suggest that you delete the project in Eclipse (don'tcheck "Also delete files on disk"), then rename the project on disk to something else, and do a clean checkout.

我建议您删除 Eclipse 中的项目(不要选中“同时删除磁盘上的文件”),然后将磁盘上的项目重命名为其他名称,并进行干净的检出。

After the checkout, you can copy any changes you make back (but don'tcopy the CVS directories or anything inside of them!)

结帐后,您可以复制所做的任何更改(但不要复制 CVS 目录或其中的任何内容!)