Searching for dependencies returns nothing
Asked Answered
B

3

12

I've just installed Eclipse Juno with m2e installed.

Then, I've created a new Maven project and decided I want log4j, so I opened the pom.xml, clicked on the Dependency tab, clicked on the Add... button and typed in log4j.

Zero results. The only thing that it finds is junit (that was automatically added to the project with the quickstart archetype, it seems). Note that I can add the log4j dependency manually and it will work just fine, but I find the search feature really convenient!

I'm a kind of a Maven beginner, though I got m2e working no problem in Indigo. So I'm thinking I might have forgot to set something?

Blackford answered 8/7, 2012 at 15:8 Comment(1)
Possible duplicate of Eclipse : Maven search dependencies doesn't workDivisionism
H
21

All you have to do is update or rebuild your workspace maven repository index.

Open your "Maven Repositories" view. Open Global Repositories and right-click on central. Enable full index and rebuild.

Initially the process will take several minutes. After that your search will start working.

You can automate this process by turning Download repository index updates on startup on in your workspace preferences under Maven

Hemlock answered 8/7, 2012 at 19:40 Comment(1)
I checked on Download repository index updates on startup but it's still not working. I am using Eclipse MarsCopley
P
1

in case rebuilding your workspace maven repository index didn't work, try reinstalling m2e. I updated mine via marketplace and it started working again. I'm not sure what was the issue but I suspect some URLs got changed recently.

Pettigrew answered 28/8, 2012 at 5:20 Comment(0)
M
0

Just go to Window -> Preferences -> Maven and check the option Download repository index updates on startup and click Apply. That's all.

enter image description here

Mickimickie answered 5/10, 2018 at 17:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.