views:

29

answers:

1

Hi

I think this was supposed to be a simple task, but I've been unable to accomplish it.

I've set an archiva repository as this:

  • 2 Internal Maven1 repos (old projects)
  • 1 Internal Maven2 repo
  • 7 Remote repos (central, java.net, jboss.org, etc.)

For each internal repo I've created a proxy connection with each remote repo.

I've added a new mirror to my settings.xml file as explained in the archiva documentation:

<mirror>
  <id>archiva.default</id>
  <url>http://repo.mycompany.com:8080/archiva/repository/internal/&lt;/url&gt;
  <mirrorOf>*</mirrorOf>
</mirror>

When I try building a simple project with one dependency from some of the remote repositories, no artifacts are downloaded. Why?!?

Thanks for any help.

A: 

Archiva doesn't assign repositories any special roles. You make requests to specific managed repository from Maven (so from your settings, internal), and it will serve what is in there, or proxy it from remote repositories that have been connected by a proxy connector. By default, that is just Central - adding a new remote repository has no effect until it is connected to a managed repository by a proxy connector.

What you probably want to do is add a proxy connector on the internal repo to the remote repositories in question. Consider setting the whitelist too so that it is more effecient.

You may also want to set up a repository group that spans all the managed repositories (both maven 1 and maven 2) for use from a single URL.

Brett Porter
Thanks, I'll try this when I get to work and see if it works.
Ubersoldat
Your solution works. I've got mvn to get the artifacts using a group. But, it's using the Maven1 repository. Anyway, it works, so that's it. I hope to get rid of the M1 stuff sooner than later.
Ubersoldat