为什么我不能在eclipse中搜索maven项目

时间:2023-01-17 14:12:01

I'm using the m2Eclipse plugin (http://m2eclipse.sonatype.org/) to handle maven modules in eclipse. After enabling a project for dependency management and for nested modules, I can no longer do a 'File Search' over the project. The search finishes instantly with the search window display "0 matches in empty scope".

我正在使用m2Eclipse插件(http://m2eclipse.sonatype.org/)来处理eclipse中的maven模块。在为依赖项管理和嵌套模块启用项目之后,我无法再对项目执行“文件搜索”。搜索窗口显示“空范围内的0匹配”,搜索立即结束。

Any ideas how I can make search work again?

有什么想法我可以再次搜索工作吗?

2 个解决方案

#1


It would appear the plugin marks any non java folder as 'derived', which is why it gets ignored by the search. Right clicking on the non java folders and deselecting the check box fixed this.

看起来插件会将任何非java文件夹标记为'derived',这就是搜索忽略它的原因。右键单击非java文件夹并取消选中此复选框。

#2


Small addition to @slashnick’s answer:

@ slashnick回答的小补充:

In the “File Search” dialog of Eclipse you can also use the checkbox “Consider derived resources” to search those “derived” resources. This may be more convenient if you don’t want to change the properties of multiple resources just for a search.

在Eclipse的“文件搜索”对话框中,您还可以使用“考虑派生资源”复选框来搜索这些“派生”资源。如果您不想仅为搜索更改多个资源的属性,这可能会更方便。

#1


It would appear the plugin marks any non java folder as 'derived', which is why it gets ignored by the search. Right clicking on the non java folders and deselecting the check box fixed this.

看起来插件会将任何非java文件夹标记为'derived',这就是搜索忽略它的原因。右键单击非java文件夹并取消选中此复选框。

#2


Small addition to @slashnick’s answer:

@ slashnick回答的小补充:

In the “File Search” dialog of Eclipse you can also use the checkbox “Consider derived resources” to search those “derived” resources. This may be more convenient if you don’t want to change the properties of multiple resources just for a search.

在Eclipse的“文件搜索”对话框中,您还可以使用“考虑派生资源”复选框来搜索这些“派生”资源。如果您不想仅为搜索更改多个资源的属性,这可能会更方便。