Some sonatype nexus questions...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Some sonatype nexus questions...

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

pic :

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 :

pic :

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 ... 

pic :

Theoretically , "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" : 

pic:

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 : 

pic:

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") : 

pic:

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 (but why?) , if this is how nexus works , how do I "force" downloading spring-core-3.0.2.RELEASE to nexus's storage ?

How do I solve these strange incompatibilities ? 


Thanks a lot !

Reply | Threaded
Open this post in threaded view
|

Re: Some sonatype nexus questions...

smallufo

It seems it is the 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.

Reply | Threaded
Open this post in threaded view
|

RE: Some sonatype nexus questions...

iamchris
In reply to this post by smallufo

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 :

+=+

If you're browsing storage, you'll only see the artifacts the proxy has downloaded. You need to make sure your proxy configuration is downloading the remote indexes. You'll see more packages then but only when your browsing the index. Also, check that repo url. You'll want to proxy the maven2, not the maven1...

+=+

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 ... 

+=+

Check that artifact name. I haven't gone looking but it looks wrong as I glance at it. Try removing -RELEASE and instead specify the specific version.

+=+

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

+=+

Ah yes. See. Here's a trick I picked up from this list: Try running a "mvn install" on your project. If you've configured your proxy properly, it will force Nexus to download artifacts it doesn't have but are available in the external repos (espically the ones that don't post an index!) ... Its klunky but it gets the job done.