ikvenu2000
ikvenu2000

Reputation: 151

How to create a local central repository for maven artifacts

My organization uses maven for all our projects. Every time we create new maven project, the artifacts are downloaded from maven central repository. But i want to create organization level local repository where all the maven artifacts are available and when new maven project created should look for the artifact in local repository and if not found, then only look in the maven central repository. Can anyone let me know how to do this.

Thanks.

Upvotes: 4

Views: 4771

Answers (2)

chkal
chkal

Reputation: 5668

You should take a look at Sonatype Nexus repository manager. It can be used as a proxy to cache remote repositories. After Nexus has been set up, you will just have to edit your settings.xml and add something like this:

<mirrors>
  <mirror>
    <id>nexus-proxy</id>
    <name>Nexus Proxy</name>
    <url>http://nexus.example.com/nexus/content/groups/public</url>
    <mirrorOf>central</mirrorOf>
  </mirror>
</mirrors>

Upvotes: 6

Raghuram
Raghuram

Reputation: 52635

You could use Artifactory or a similar Repository Management tool

Upvotes: 1

Related Questions