问题描述
我在新工作区中创建了一个新的简单 Maven 项目.
I created a new simple Maven project in a new Workspace.
当我在 Eclipse 编辑器中打开 pom.xml
的 Dependencies
视图,并选择 Add..
依赖项时,没有搜索无论我在搜索字段中输入什么搜索条件,都会得到结果:
When I open the pom.xml
's Dependencies
view in Eclipse editor, and I choose Add..
dependency, there's no search results no matter what search criteria I input in the search fields:
它立即给我,例如,'spring' (0) 的结果
.
在我的另一个工作区中,我现有的项目没有这个问题.
In my other workspace, with my existing projects I don't have this problem.
有没有办法解决这个问题?
Is there a way to fix that ?
推荐答案
Eclipse 工件搜索依赖于存储库的索引文件.你好像没有下载索引文件.
Eclipse artifact searching depends on repository's index file. It seems you did not download the index file.
转到 Window -> Prefrences -> Maven 并选中在开始时下载存储库索引更新".重新启动 Eclipse,然后查看进度视图.应该正在下载索引文件.
Go to Window -> Prefrences -> Maven and check "Download repository index updates on start". Restart Eclipse and then look at the progress view. An index file should be downloading.
下载完成后,神器搜索就可以使用了.
After downloading completely, artifact searching will be ready to use.
更新您还需要在Maven 存储库视图"中重建您的 Maven 存储库索引.
UPDATEYou also need to rebuild your Maven repository index in 'maven repository view'.
在此视图中,打开全局存储库",右键单击中央",选中启用完整索引",然后,单击同一菜单中的重建索引".
In this view , open 'Global Repositories', right-click 'central', check 'Full Index Enable',and then, click 'Rebuild Index' in the same menu.
将下载一个 66M 的索引文件.
A 66M index file will be downloaded.
重建索引">
这篇关于Eclipse:Maven 搜索依赖项不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!