We are setting up a series of Nexus servers and our current model is to use one as the primary server and on the other remote servers use proxy repositories pointing back to the primary. This works fine when the proxy repository on the secondary server is pointing to a hosted repository on the primary server. Searches using the service/rest/v1/search/assets endpoint against the secondary server return a list of the items on the primary. However if the proxy repository on the secondary server is pointing to a group on the primary server then the service/rest/v1/search/assets endpoint on the secondary server returns an empty list of items.
Is it possible to use a proxy repository on one server to point to a group on another server? If so what is needed to make this work?
A proxy repository pointing to a group repository should work just fine. Keep in mind that the search APIs on the secondary servers will only know about items that have been requested from that proxy - if nobody asks for a package it doesn’t exist on the secondary server and Repository Manager won’t proxy the search request back to the primary one.
Note that the same thing applies to proxy repositories in general. If you have a maven-central proxy, searching for content in that proxy will only return results from things that have been requested through the proxy. The full list of dependencies on maven central is quite large.
Can any one help me : Is there Any kind of workaround or alternative Solution for “Pro version feature - Smart proxy” for OSS ? As Request for Proxy Group fails due to proxy Repository not cached from hosted until Request to repository been done.
@mpiggott / @mmartz : Is there Any kind of workaround or alternative Solution for “Pro version feature - Smart proxy" kind for OSS ? As Request for Secondary nexus -Proxy fails due to not being cached from hosted until Request to Primary - repository been done. As Colin said in above , our tests are failing due to same issues, Repo type used is maven2, not npm. Please help
I’m still unclear on what problem exactly you are having. You cannot use the search api of a proxy repository to determine what maven content is available in the hosted repository. If you have a proxy repository pointing to a hosted repository and then maven tries to run a build through that proxy it should get anything it needs from the hosted repository with some exceptions related to the proxy’s cache settings.
@mmartz : Proxy Repository (Secondary node) which is pointing to Hosted Repository (primary node)works Perfectly fine…but Issue is on the Repository Group (on Secondary node- which uses proxy repo) does not gives expected results for query or curl wont work for the data that has not been cached on Proxy Repository from Primary or hosted, So we are trying to have same functionality for Group as like repository works upon request.