Quantcast

How to proxy another snapshot repo without caching metadata

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to proxy another snapshot repo without caching metadata

Wabner, Thomas
Hello,
 
we want to proxy a SNAPSHOT repository from one nexus instance to another (also another location).
 
We have setup the proxy repo with the following Expiration Settings:
 
Not Found Cache TTL     0       minutes
Artifact Max Age        0       minutes
Metadata Max Age        0       minutes
Item Max Age            0       minutes
 
What we want to achieve is the following: If a user deploys to the SNAPSHOT repository in location A and another user requests for the latest SNAPSHOT in location B, nexus from location B should copy the latest version from A and deliver it to B.
 
Or is there is another approach for such situations?
 
Thanks in advance,
 
- Thomas
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to proxy another snapshot repo without caching metadata

Rich Seddon
Metadata max age is the one that matters for snapshots, as long as Maven gets the latest maven-metadata.xml files it will be able to retrieve the latest timestamped snapshots.

You might also need to set the not found cache ttl to 0 though, this will be occasionally needed in cases where the first snapshot for a GAV is published.  If a build running against the proxy attempts to retrieve this before it is available on the master the 404 response will be cached for the period of time set in the not found cache ttl.

If Nexus Pro is an option then take a look at the smart proxy feature, it's designed to handle this situation and still allow proper caching to take place.

http://books.sonatype.com/nexus-book/reference/_introduction_3.html

Rich

On Fri, Oct 24, 2014 at 5:30 AM, Wabner, Thomas <[hidden email]> wrote:
Hello,
 
we want to proxy a SNAPSHOT repository from one nexus instance to another (also another location).
 
We have setup the proxy repo with the following Expiration Settings:
 
Not Found Cache TTL     0       minutes
Artifact Max Age        0       minutes
Metadata Max Age        0       minutes
Item Max Age            0       minutes
 
What we want to achieve is the following: If a user deploys to the SNAPSHOT repository in location A and another user requests for the latest SNAPSHOT in location B, nexus from location B should copy the latest version from A and deliver it to B.
 
Or is there is another approach for such situations?
 
Thanks in advance,
 
- Thomas
 

Loading...