This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Shared Maven Local Repository? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Shared Maven Local Repository?" Watch "Shared Maven Local Repository?" New topic
Author

Shared Maven Local Repository?

Swerrgy Smith
Ranch Hand

Joined: Mar 26, 2010
Posts: 88
Hi all,

We are a group of developers who use Maven for a J2EE project.
How can I create and configure a shared local repository on my computer so that other developers can access and use its libraries? (Otherwise, each developer must have a separate .m2 directory and download the same libraries from the central repository).

Thank you very much.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15947
    
  19

Actually, you are better off dedicating an independent server computer to do this, since it can be a real nuisance to asymmetrically configure a desktop machine to act as a server. A popular approach is to use Sonatype's Nexus server software, which can cache both universal artefacts and local project artefacts.

You actually don't want to eliminate the ".m2" cache, since its primary purpose is to speed up compiles with a side benefit of not having to keep separate copies of the artefacts in each individual project. But by using a central server, you can reduce Internet overhead and at the same time publish internal shared objects.


Customer surveys are for companies who didn't pay proper attention to begin with.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

I'll second Tim's comments. Having a Nexus repository in house is the best way to go. Makes sharing binary artifacts with other people in your company simple. I would also recommend setting up Jenkins to manage your builds.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Shared Maven Local Repository?
 
Similar Threads
Just a basic question
Simple MAVEN questions
How do I add a jar file to artifactory?
Error Compiling Maven Project
New with Maven(m2eclipse)