Search code examples
maven-2mavenm2eclipsenexussonatype

Some sonatype nexus questions


I deployed a sonatype nexus server inside my LAN , mapping some remote repositories to my public repositories :

alt text http://img576.imageshack.us/img576/5517/7875d01884ad4234a5b02e2.png

First question is , why these repositories not sync with the "real" repositories ? For example , I mapped maven central (http://repo1.maven.org/maven2) to "central" , but when I browse http://smallufo:8081/nexus/content/repositories/central/org/springframework/ , the packages are not complete , in http://repo2.maven.org/maven2/org/springframework/ , there are tons of artifacts , but I only have some of them :

alt text http://img63.imageshack.us/img63/6163/31beec445d6b4e9eb96beba.png

And versions are old ... ex : spring-core is only 2.5.6.SEC01 , but the latest version is 3.0.2.RELEASE. And my maven client seems can only find the old artifacts ... alt text http://img199.imageshack.us/img199/3872/maven.gif

"central" is a proxy directory , it should be the same with the remote server. I tried to "Expire Cache" , "ReIndex" , "Incremental ReIndex" the whole "central" : alt text http://img23.imageshack.us/img23/8467/391bd49409c94aa58640afe.png

After a long time with almost 100% java process load , the situation seems not better , just add some artifacts ... not reflecting the real "Maven Central" data...

Second question , what's difference with "Expire Cache" , "ReIndex" , "Incremental ReIndex" ?

Even I can "search" spring-core.3.0.2.RELEASE , my m2eclipse still cannot find it : alt text http://img217.imageshack.us/img217/9360/18c15abab4f343b0848a819.png

I can also see the spring-core-3.0.2.RELEASE in the "index" , (but not available in "storage") : alt text http://img268.imageshack.us/img268/7041/maven2.gif

But why m2eclipse cannot make use of it ? it seems m2eclipse can only install artifacts in the storage , if this is how nexus works , how do I "force" download spring-core-3.0.2.RELEASE to nexus's storage ?

How do I solve these strange incompatibilities ? Thanks a lot !

-- updated --

It seems it is problem with m2eclipse and maven-3.0-beta1.

After I change back to maven 2.2.1 , everything works fine now.

Sorry for the disturbance.


Solution

  • Nexus only caches artifacts that clients have requested. So you need to set up your project poms to request the proper versions.