Publishing Your Artifacts to the Central Maven Repository

nx-big_large1If your project’s artifacts are published to the Central Maven repository it is trivial for your users to add a dependency and start using your project’s library or framework, but if your project is hosted somewhere like Sourceforge and there is no repository manager or repository setup for synchronizing to the Maven Central repository, getting your artifacts into Central can be a pain. The old process for publishing your artifacts to central required several manual steps for you and for the Maven team to setup and enable an rsync location… assuming you can find a location to host your files at all.

At Sonatype, we want to make synchronizing and publishing your artifacts to central easier both for you and for us, and we want to improve the quality of repository metadata for everyone at the same time. We have setup a dedicated instance of Nexus Professional at http://oss.sonatype.org specifically to host the artifacts of other Open Source projects. In this post, I talk about the process of creating a repository for your open source and publishing artifacts that can easily be integrated into the Maven Central repository once they are published to this freely available resource.

This instance has actually been running and in production for months by invitation only for projects such as Plexus, Jetty and Ehcache (Greg wroteabout his experience with migrating to oss.sonatype.org). We now have tooling in place to make it relatively easy for us to process a larger set of requests, so we’re just now starting to publicize the availability.

To get the process started, go here. We’ll setup a release and snapshot repository for your project, along with the appropriate configuration to allow you to use the Staging features for your releases. If you have an existing repository somewhere, we can migrate that for you too.

Since the Sonatype machines sit in the same rack as the Maven Central repository, we are able to synchronize the repositories every hour instead of twice a day.

In the coming weeks we will have a pre-release of Nexus 1.4 Pro running on this instance that allows customizable rules to be run during the staging process. This will allow the system to automatically check things like valid pgp signatures and correct POM parsing. This will ensure that your users have the best experience possible when using your artifacts, and relieve some of the manual validation on your side, a win for everyone.

On the technical details, this instance gets its network connection via Contegix’s high availability network, the same one running Maven Central (and Codehaus.org and Atlassian.com), and the data is backed up offsite daily.

 

Maven, Nexus , , ,

blog comments powered by Disqus