Over a million developers have joined DZone.

Using a Maven Repository on Kenai

DZone's Guide to

Using a Maven Repository on Kenai

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

One of the missing things on Kenai is a Maven repository. I mean, an "official" Maven repository managed by Kenai staff. This doesn't mean you can't create your own repository on Kenai. Peter Mount explains ( part one, part two) how you can just create a Maven repository as a Subversion site - in his latter post, Peter shows how to automatically perform a deploy by using Hudson, with some script trickery.

But, thanks to the wagon-svn maven plugin, it is possible to do that directly with Maven. The plugin implements a Maven extension making it able to deploy to any Subversion-based repository (actually, it has been developed for Java.Net, that has got such a repository).

So, I've just created a Tidalwave project on Kenai, that I'll use for hosting some common facilities for all my projects, then I added a Subversion repository named "tidalwave~maven-repo". To deploy to that repository, a pom needs the following elements:

<name>Java.net Repository for Maven</name>

<name>Tidalwave Maven Repository</name>



The declaration of the Java.Net repository is used to find the wagon-svn plugin, that takes care of target repositories whose URL starts with svn:.

The first time you do a mvn deploy, the computer will ask for the username and password of the target repository; after you set once, they will be remembered in the Subversion preferences, so this thing will also work with Hudson.

You can check out a very small Maven project using my new brand Maven repository from here: https://kenai.com/svn/thesefoolishthings~svn/trunk/src - TheseFoolishThings is a collection of tiny libraries (mostly made by a single file) for functions that so far I used to copy & paste in different projects, and that now I'm refactoring.

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. 


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}