Eclipse将项目中的所有文件视为“派生” [英] Eclipse treating all the files in a project as Derived

查看:157
本文介绍了Eclipse将项目中的所有文件视为“派生”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Eclipse工作区中创建了一个动态Web项目。它也是一个Maven项目,并且受SVN控制。但是在打开资源(Ctrl + Alt + R)中,除非我从窗口的选项(右上角下拉菜单)显示派生资源中进行检查,否则不会显示该项目中的文件。

I have created a Dynamic Web Project in my Eclipse workspace. It is also a Maven project, and under SVN control. But in "Open Resource" (Ctrl+Alt+R) no file from this project appears, unless I check from the window's options (top right drop-down) "Show Derived Resources".

我已经检查了项目的某些文件夹,但未将它们标记为派生。

I have checked on some of the project's folders and they are not marked as "Derived".

我在另外两个(普通Java)项目中工作区,所有文件都在开放资源中可见。

I have two more (plain Java) projects in the workspace, and all the files from them are visible in "Open Resource".

您知道Eclipse,Maven插件或Subclipse(SVN)可能出了什么问题吗?

Do you know what might be wrong with either Eclipse, the Maven plugin or Subclipse (the SVN plugin)?

推荐答案

在使用Maven和Subclipse插件时,我在Eclipse(Ganymede)中遇到了类似的问题。我尚未确定哪个插件导致了此问题,但我怀疑它与包含嵌套模块的pom.xml有关(即< modules>< module> main-module< / module> <模块>集成测试< /模块> )。这些在Eclipse中显示为带有自己的pom.xml文件的嵌套文件夹(尽管我已经安装了多项目插件,但我没有使用它)。

I experienced a similar issue in Eclipse (Ganymede), when using the Maven and Subclipse plugins. I have not determined which plugin caused this problem, but I suspect that it is related to my pom.xml containing nested modules (ie. a <modules><module>main-module</module><module>integration-test</module>). These appear in Eclipse as nested folders with their own pom.xml files (I did not use the Multiple Projects plugin although I have installed it).

我假设其中一个当我通过SVN签出项目,然后更新MVN依赖项和项目设置时,插件错误地在这些文件夹上设置了派生标志。

I assume that one of the plug-ins has incorrectly set the derived flag on these folders when I checked out the project by SVN and then updated the MVN dependencies and project settings.

当我右键单击时->顶级嵌套模块目录上的属性,我可以看到已检查Derived标志。通过取消选中模块目录上的derive标志(并改为检查每个子模块内目标目录上的derive标志),它修复了开放资源功能。

When I right click->properties on the top-level nested module directories I can see the Derived flag is checked. By unchecking the derive flag on the module directories (and checking the derive flag on the target directories within each sub-module instead), it fixed the Open Resource functionality.

派生的标志是从目录继承的,您可能需要检查层次结构中的所有目录以找到罪魁祸首。

As the derived flag is inherited from directories, you may need to check all of your directories in the hierarchy to find the 'culprit'.

如果它有助于插件作者,我的顶级模块目录的名称中包含连字符'-'。也许这会淘汰其中一个插件。

If it helps the plug-in authors, my top level module directories contain a hyphen '-' in their names. Maybe that is throwing out one of the plugins.

这篇关于Eclipse将项目中的所有文件视为“派生”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆