Mirror Link

We use maven / nexus combo and it works well. We have home projects / maven plugin uploaded to nexus and anyone can access and use it as expected. Our central hudson assembly loads / manages nexus artifacts.

My company added a remote location, and network connectivity was a problem for this place. In general, network communications are slow and unreliable.

How do I set up a connection in a remote location so that it displays the connection in my location? Thus, developers in a remote location can point to a local nexus server that can mirror another nexus server. We prefer to keep one location as the master / control location - makes life easier.

Is it right to do this, or can we solve this problem in some other way?

+4
source share
2 answers

This is the right way.

Configure your remote location to mirror your primary Nexus. (Login as administrator, repositories, Add, proxy repository.

Then in the Maven developer settings.xml, add the Nexus remote location as a mirror for your main Nexus.

First, access artifacts are copied to a remote location.

What is it.

+3
source

The issue is a bit old, although perhaps interesting for questions regarding repositories that should support ivy and dynamic versions. With current nexus versions (~ 2.7), the nexus pro proxy function works fine for all maven users at the moment and should be a common solution for your problem itself, but for individually configured ivy layouts there is a problem:

However, it will not work for special layouts at this time. The problem is that the smart proxy server will not work if the connection is somehow omitted. Usually a request using dynamic versions (for example, "1.2. +") And a custom layout in the proxy server should lead to the extraction of the artifact from the wizard. This is not yet possible, but may be in later versions of nexus (3.0).

We ensured full proxying of our artifacts, also in the event of a temporary disconnection, by creating lists of artifacts from the wizard, then building a list in the slave, and then calling a simple wget script with full version information in the proxy. It will sequentially retrieve the missing artifact from the master. You can call this a repository replication type.

+1
source

Source: https://habr.com/ru/post/1396471/


All Articles