Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top