Jan Engler
Jan Engler

Reputation: 121

Maven behind a proxy

Following situation:

We have a quite big projects that I am trying to mavenize. Therefore we have installed our own nexus repo manager. Everything works so far but now we face the situation that every dev must enter his/her proxy username and password into the settings.xml to get artifacts from outside (i.e. Internet).

Unfortunately the devs need to change their proxy passwords every now and then and they need to apapt the settings.xml again.

The connection to our nexus is not routed over the proxy. Is there a possibility to configure a DNS like approach:

  1. Client A asked (company intern, non-proxy) nexus for artifact a.jar.
  2. It is not located in the local repos, so the nexus then retrieves that artifact from maven central and stores it in it's local cache.
  3. Client A gets the artifact a.jar as if it came directly from the company nexus.
  4. Everybody is happy :)

Upvotes: 4

Views: 744

Answers (2)

Jean-Rémy Revy
Jean-Rémy Revy

Reputation: 5677

Il will give you a more accurate answer as soon as you'll reply to my question, but anyway, here is the best way to achieve what you want.

Nexus, Artifactory and other repo manager (like smw pointed out), are able to act as a proxy for you. They will receive your requests, look into their own database for searching your atifacts, and then access to Internet if they didn't found anything.

You must configure Nexus telling it what repo it have to mirror, and optionnaly give it proxy credential :

Upvotes: 3

smw
smw

Reputation: 592

A repository manager can do just this for you. There's a short list of them on the Maven website.

Upvotes: 1

Related Questions