Fabrizio Giudici is a Senior Java Architect with a long Java experience in the industrial field. He runs Tidalwave, his own consultancy company, and has contributed to Java success stories in a number of fields, including Formula One. Fabrizio often appears as a speaker at international Java conferences such as JavaOne and Devoxx and is member of JUG Milano and the NetBeans Dream Team. Fabrizio is a DZone MVB and is not an employee of DZone and has posted 67 posts at DZone. You can read more from them at their website. View Full User Profile

Sonatype Free Maven Repository Hosting For FLOSS projects - Great Stuff!

02.26.2010
| 9082 views |
  • submit to reddit

When I start the mavenization of my projects, I had some doubts - because of my ignorance - about where to put my Maven repositories. I have two scenarios: some projects (most notably BetterBeansBinding) can be synchronized to the Maven Central Repository, others can't because they depend on third parties' products that aren't hosted on the Central Repo. But even in the former case, the way the Central works assumes that you first deploy on a repo that you manage in some way, and then Central sucks artifacts from there.

Java.Net has got a Maven repository, but it has been always plagued by problems, as for instance Jean-Francois  just explained. Kenai doesn't have any specific Maven repository support, but it's possible to create one on the top of a Subversion repository or (better solution) a WebDAV web repository. In fact, I've first tried this solution months ago.

Sonatype offers free Maven repositories hosting for FLOSS projects, based on an instance of Nexus. I've moved most of my stuff there and I've just learnt from Jean-Francois that Sonatype is going to host all the projects that are currently at Java.Net. I think that this is great, because of a number of reasons:

  1. Sonatype repos are very fast, much faster to deploy stuff to than Java.Net or a custom-made repo at Kenai.
  2. Sonatype offers staging repositories, that is when you perform a release the artifacts first go to a temporary repository where you can test that everything is ok, and then you promote it, pushing the artifacts to the real release area. If you want to sync to the Central Repo, they will also trigger a good deal of automated tests to make sure that your artifacts qualify for the Central. If you made a mistake, you just drop the staging repo and retry.
  3. Sonatype offers also repositories for snapshots.
  4. Sonatype support, by means of their issue tracker, is very very good in my experience, for competence and response times.
  5. Sonatype hosting based on Nexus provides support for .index files, which means that the NetBeans IDE can mount them and allow you to efficiently navigate into them, also optimizing the parsing of POMs and the embedded search for artifacts.
So, if I were Oracle, I wouldn't spend time and efforts to create specific Maven support at Kenai (that will be the new Java.Net) - using Sonatype's facilities seems to me the best way to rationalize resources across the Java Community.
Published at DZone with permission of Fabrizio Giudici, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)