You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Curtis Rueden <ct...@wisc.edu> on 2012/01/30 20:59:34 UTC

Re: Creating a shared repository

Hi Alec,

I was wondering if I could build a repository on a server here and make it
> available to all the machines that will build the project.   Basically, a
> local version of the maven global repository.   Is that a good approach?
>

Yes, this is exactly what Repository Managers like Nexus and Artifactory
are for.

See: http://nexus.sonatype.org/why-nexus.html

Maven becomes much more excellent when paired with a good repository
manager. In many ways, it acts as a revision control system for your binary
artifacts. Through the web UI you can easily deploy whatever dependencies
you need, thus making them available for your projects.

Once you have the repository manager set up, you just add a reference to
your organization's repository in your POM. See repositories and
distributionManagement sections of the POM reference.

E.g., I work on the ImageJ2 project:
  http://developer.imagej.net/

We run a Nexus at:
  http://code.imagej.net:8081/

The relevant POM:
  https://github.com/imagej/imagej/blob/master/pom.xml

Regards,
Curtis


On Mon, Jan 30, 2012 at 1:37 PM, Alec Fernandez <Al...@sas.com>wrote:

> Hello,
>
> I'm new to maven so this may be a bad question.  If so, please forgive me.
>
> I'm building a project that includes a lot of jars that are given to me by
> other groups but that are not in the maven remote repository, there are
> several of us all working on the same project so for each of us to install
> the jars and update them as required in our local repositories would be a
> pain.  Plus this would have to be done on our build/test machines as well.
>
> I read that I could add pointers to their location on my local file system
> in my pom.xml and using the system scope but then I would have to make this
> file system available on the machines of all team members and also on our
> Jenkins server.  Some use Unix, others windows so this is a bit of a pain.
>
> I was wondering if I could build a repository on a server here and make it
> available to all the machines that will build the project.   Basically, a
> local version of the maven global repository.   Is that a good approach?
>
> I looked on the mail archive and the doc but didn't  find anything.
>
> I did find this:
> http://www.mkyong.com/maven/how-to-include-library-manully-into-maven-local-repository/
>
> Is this correct?
>
> I'm running maven 3.0.3 and I don't have the install plugin so I guess
> that would be step 1.
>
> Have I got this right?  Am I heading in the right direction?  Any advice
> would be appreciated.
>
> Saludos,
> Alec
>