4

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 :)
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
Jan Engler
  • 121
  • 2
  • 10
  • Are your Nexus connected to Internet, even through your proxy/firewall or not ? In both case, nexus will act as a proxy for you. If it can't access to Internet, for any reason, you'll have to setup you own settings.xml, for each developer. – Jean-Rémy Revy Feb 06 '13 at 10:44

2 Answers2

3

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 :

Jean-Rémy Revy
  • 5,607
  • 3
  • 39
  • 65
  • Hi, sorry for late answering, was away for a few days. Yes, our nexus is connected to the internet and after following you link, it works fine now :) I added a mirror for central to the settings.xml: ` central-proxy Local proxy of central repo http://mynexus:8080/nexus/content/repositories/central/ central ` Now even the attempts to maven central are proxied using our nexus. Thanks a lot! – Jan Engler Feb 08 '13 at 09:25
1

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

smw
  • 592
  • 4
  • 10