Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven m2eclipse Unable to update index for nexus

I have a remote maven repo set up and can successfully upload artifacts and download via POMs. I also see the repo listed along with maven central in my m2eclipse global 'Maven Repositories'.

My problem is that while Maven Central is browsable and updatable in m2eclipse, my internal one is not and when it tries to update I get this:

"Unable to update index for Nexus|http://devserver:8081/nexus/content/groups/public"

Putting that url in a browser does work.

A solution is "I was able to fix it by launching the Nexus webapp and I choose repair index and rebuild index on the Public Repository Group."

but I can not rebuild the public index, and actually the index works fine for my colleague in the same office.

  • nexus Nexus Public Mirror http://devserver:8081/nexus/content/groups/public *

Any ideas how to make m2eclipse to index properly? Thanks!

like image 401
tim Avatar asked Jul 13 '11 16:07

tim


People also ask

Does Nexus support Maven?

Nexus Repository 3 does in fact support Maven (2) as a format.

What does Rebuild Index do nexus?

The Rebuild Index button allows you to drop and recreate the search index for the proxy repository, synchronizing the contents with search index.

Is Nexus a Maven repository?

Introduction. Historically Nexus Repository Manager started as a repository manager supporting the Maven repository format and it continues to include excellent support for users of Apache Maven, Apache Ant/Ivy, Eclipse Aether, Gradle and others.


1 Answers

I had the same problem: it happens, i believe, when the local m2e index becomes corrupted, mainly when an Eclipse/VM crash occurs. I have found that, for my configuration, the index resides in .m2/repository/.cache/m2e

I closed Eclipse, deleted all the subfolders inside that folder, and I fixed the problem.

I'm sure that it suffice to seek the file(s) where lies the index, but deleting the whole directory worked fine for me.

Ensure, before deleting, that your remote maven repo index is not corrupt (right-click repair Index in the public repository of Nexus).

like image 152
Giulio Quaresima Avatar answered Sep 20 '22 02:09

Giulio Quaresima