aspose file tools*
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
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: 91
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: 16145
    
  21

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: 5837
    
    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?