How to let m2eclipse use nexus repositories instead of maven one

Posted by lisak on Stack Overflow See other posts from Stack Overflow or by lisak
Published on 2010-05-21T00:14:18Z Indexed on 2010/05/21 0:20 UTC
Read the original article Hit count: 355

Filed under:
|
|
|

I have this situation: An artifact in maven local repo that I don't want to use anymore. Instead, I want it to be downloaded by maven from proxied nexus remote repository. It's a typical situation cause a lot of artifacts are called just name-SNAPSHOT and the artifact is changing but the name is still the same. Eclipse with m2eclipse is running.


  • I delete the entire directory of the artifact in local maven repo
  • m2eclipse "Reindex local maven repository" - which creates a new nexus index for local maven repo I guess
  • Project -> maven > Update Dependencies - now m2eclipse should run maven, which doesn't see the artifact in local maven repo, so it uses nexus repositories to download it (expected behavior)
  • Instead, the directory structure in maven local repo is recreated and there is this file: "m2e-lastUpdated.properties" with following inside:

local|http\://nexus\:8082/nexus-webapp-1.6.0/content/groups/public|javadoc=1274399332215 local|http\://nexus\:8082/nexus-webapp-1.6.0/content/groups/public|sources=1274399332161


and m2eclipse says Missing artifact net.sourceforge.htmlunit:htmlunit:jar:2.8-SNAPSHOT:compile

even though the artifact physically exists here: nexus:8082/nexus-webapp-1.6.0/content/repositories/htmlunit-snapshot/net/sourceforge/htmlunit/htmlunit/2.8-SNAPSHOT/htmlunit-2.8-SNAPSHOT.jar


Maven just doesn't use this location at all. Trust me I tried everything, this m2eclipse behavior is terrible.

© Stack Overflow or respective owner

Related posts about m2eclipse

Related posts about maven