views:

168

answers:

2

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

alt text

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

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

"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

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

I can also see the spring-core-3.0.2.RELEASE in the "index" , (but not available in "storage") : alt text

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.

A: 

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

krosenvold
Yes , I requested , but m2eclipse responses missing artifacts ...
smallufo
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.
smallufo
A: 

Nexus only proxies what the build has requested, that's why it doesn't have a full copy in the local storage of every repo. Trust me you wouldn't want that anyway. You typcially only need a very small subset of for example the 100gb Central repo.

You can read the details about the various Expire/Reindex etc operations here: Nexus Scheduled Tasks

Brian Fox