Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Maven & SVN

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

we are currently developig our system with the SVN versión control system. Due to emerging project requirements we are going to introduce Maven in our overall developing and deployment strategy.

I have checked some tutorials and seen (or at least seems like) that SVN and Maven are compatible. My question is what is the recommended way to go and if anyone can point me to a tutorial even better. However I am sure the Apache Maven site will hold all documentation I need to proceed.

Now the question:

we are a team of 3 developers. Should each one of them hold his own Maven repository or base all of us in a remote one?. The question might seem pretty obvious in favor of the remote repository, but the point is if Maven will easilily and successfully manage different versions, and in the end be able to retrieve the most uptodate versión of the system.

On the other hand it seems meaningful to me that everyone holds his own repository, for finally publishing to a generic one.

If anyone has any experience with this it would be of great help if you could share some hints.

Many thanks in advance,

Carlos Conti.
 
Saloon Keeper
Posts: 22246
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SVN and Maven are quite happy to work with each other.

Every Maven user gets a local repository (the Maven cache). Usually in MAVEN_HOME. This repository keeps Maven from having to repeatedly download all the dependencies a project needs every time a build is done.

When sharing assets in-house, it's not a bad idea to have a shared repository as well. The Sonatype Nexus repo is very popular.

Basically, what this does is allow a place for your to publish (deploy) your in-house artefacts on a common in-house server while still getting the performance benefits of your local cache. If I do a "mvn deploy" on my module to push it to the server and your POM is set up to use that server as one of its repositories, then next time you do a build calling for my artefact, your copy of Maven will pull from the Nexus server and cache it in your local maven cache.

There are additional benefits that Nexus can bestow as well. It supports both final and snapshot artefacts, making it easier to work with resources that are under active development. And it can proxy-cache stuff from external repositories (including the Central Maven Repo), which means that once fetched, all the in-house users can retrieve those resources at full LAN speeds instead of individually having to retrieve straight off the Internet (which in some of the more tightly-controlled shops may not be allowed anyway).

The Nexus repository server, incidentally, is a J2EE webapp. It runs quite nicely in a Docker container, which is how I do it.
 
    Bookmark Topic Watch Topic
  • New Topic