Eclipse: Maven Search Dependencies Not Working

I created a new simple Maven project in a new workspace.

When I open the pom.xml Dependencies pom.xml in the Eclipse editor and select Add.. dependency, there are no search results no matter what search criteria I entered in the search fields:

It instantly gives me, for example, Results for 'spring' (0) .

In my other workspace, with my existing projects, I don't have this problem.

Is there any way to fix this?

+90
eclipse maven maven-plugin maven-dependency-plugin
Dec 27 '12 at 18:50
source share
6 answers

The search for the Eclipse artifact depends on the repository index file. It seems you have not uploaded the index file.

Go to Window -> Prefrences -> Maven and check "Download warehouse index updates at startup . " Restart Eclipse, and then view the progress view. You must download the index file.

After the full download, the artifact search will be ready for use.

Maven settings

UPDATE You also need to rebuild your Maven repository index in the maven repository view.

In this view, open Global Vaults, right-click central, select the Enable Full Index check box, and then click Restore Index in the same menu.

The 66 MB index file will load.

Maven Repositories -> Rebuild Index

+182
Dec 28
source share

You can get this result if you are inside the corporate proxy, and the new project does not point to the correct settings.xml file with the proxy credentials.

You can also get this if you are using Maven proxies (e.g. Nexus), and the index to the proxy server is somehow messed up. I do not know a way to describe how to fix this. Fool yourself or call the one who installed the Maven proxy.

You can also get this if the new workspace has not yet downloaded the index from either the Maven center or the proxy. (This is the best as you just have to wait a while and it will work on its own.)

+4
Dec 27 '12 at 18:55
source share

The dependency of adding maven actually depends on the maven indices. If the indexes are updated, the result should be from there.

If you go to the maven repository, then select the global repository, you will see the central tab and select that there should be a list of folders, and you should see all the indexes from there, If not, then you have not received the full index, then you can right-click mouse and enable full index.

Another thing that annoyed me the most was that I did everything, but didn't show anything when I type β€œspring.” Actually, I was wrong. If you just type in the additional text "springframework", BOOM, the result will be there.

+3
Aug 14 '16 at 15:37
source share

For me, this problem worked:

  • delete ~ / .m2
  • enable "Full index enabled" in the maven repository view in the central repository
  • "Restore index" in maven central repository.

After restarting eclipse, everything works fine.

+3
Aug 16 '17 at 9:07 on
source share

I have the same problem. None of the options above worked for me. However, I find that if I say it manually, add groupid / artifact / version for org.springframework.spring-core version 4.3.4.RELEASE and save the pom.xml file, dependencies will load automatically and the search will work for existing banners in repositories. However, if now I search for org.springframework.spring-context that is not in the current dependencies, this search still does not work.

+1
Dec 09 '16 at 2:46
source share

Use https://search.maven.org/ manually with the fc: prefix to search for class names. Both Netbeans and Eclipse seem too dumb to use this search interface, and the gigabytes of downloaded repository indexes do not seem to contain any class information. Total loss of disk space. These IDE projects have been so poorly supported lately, I would like them to advance development on GitHub.

0
Jun 03 '17 at 6:51
source share



All Articles