Arunkumar
Arunkumar

Reputation: 61

SVN Backed Maven Repo

We are using SVN as a Maven Repositary. We knew that it isn't advisable to have SVN backed maven repository, but still we have to go with it due to limitation within our organization. SVN backed repository used currently is partially implemented.We have developers working from two different geographical location. Problem we face now is whenever a developer adds a artifact to maven repo(svn repository) all other developers have to update the local svn view manually to get the newly added artifact before we do mvn clean package.

IS there a way to automatically download the artifact from svn maven repository to local repo if the artifact doesn't exists locally?

SVN is hosted with a webserver so maven repositary is accessed using HTTPS protocol only. We use maven 2.2 version.

I tried with wagon plugin which would deploy the build output(jar\war) to scm directly. We are not interested in deploying the build outputs. We need a solution to download artifacts automatically from svn maven repo if it isn't exists locally?

Upvotes: 1

Views: 671

Answers (1)

Mark O'Connor
Mark O'Connor

Reputation: 77951

You make no mention of how your SVN repository exposes it's artifacts to the development teams. If it truly a Maven repository (conforming to the standard Maven repository layout) then you could just specify it's URL in the "repositories" section of your POM. Updating the local repo would then no longer be necessary.

I suspect that what you have checked into subversion is not a Maven repository layout? You'd lose one of the key benefits of using subversion if each new version of an artifact was being checked in as a new file....

You are describing the functionality offered by any Maven repository manager, for example: Nexus. I understand your reluctance to embrace a new repository technology, but SCM systems like subversion are primarily designed for tracking changes to textual files.

In conclusion, if you truly wish to keep subversion in the loop I'd suggest one of two options:

  1. Use subversion to control the contents of the local repository. (3rd party dependencies and the artifacts generated by the developers)
  2. Use a repository manager like Nexus. Let Nexus manage cached content from external repositories, but commit the contents of locally hosted repositories into Subversion.

Upvotes: 2

Related Questions