Maven local repository in CVS?
I would like to use my CVS as maven repository.. can anyone give sugges开发者_StackOverflowtions?
There are 2 ways:
a) If you want to use it only in one project place a 'repo' directory at the toplevel. Than add jars in the maven convention (groupid in folders/artifactid/version/artifactif-version.jar). To use this as a repository declare a file based repository in your pom.
<repositories>
<repository>
<id>some-repo</id>
<name>some-repo</name>
<url>file://${basedir}/repo</url>
<releases>
<checksumPolicy>ignore</checksumPolicy>
</releases>
</repository>
</repositories>
If you use this from a module pom you have to use a url relative to your module pom.
b) if you want to use it for several projects there are socalled 'wagons'. There is one for svn. These maven plugins let you use a SCM as repository. I don't know whether there is a cvs-wagon.
I would not put the dependencies in an SCM system like CVS for many reasons.
Each time you update a dependency in the pom, you need to manually add the corresponding dependency jar - in the exact same folder structure as expected by maven.
You need to worry about transitive dependencies and it can be overwhelming.
Since these dependencies do not change (except if they are SNAPSHOTS), SCM is an overkill for them. Each time there is a new version of the dependency, it needs to be in a different folder structure.
If you want to have control over the dependencies, you could create your own maven mirror using a repository manager. These store the dependencies typically using some content management libraries and can be backed up/archived.
On a related note, Maven Wagon SCM Provider can be used to publish projects to an SCM, but has not been tested with SCM based remote repository.
精彩评论