Wednesday, 8 January 2014

Java: taking jsonunicode to Maven central

Sonatype provide the means and instructions to promote open source software to Maven central. I opted to refactor a small library from a previous post on JSON and publish it as a library called jsonunicode.

Project hosting

I opted to use SourceForge even though the service has been under fire recently. See also Advertising, Bundling, Community and Criticism. Still, they make it easy to do little things like publish the Maven-generated site and developers consuming a library via Maven are unlikely to be affected by the contentious issues.


I opted to use a dedicated Linux virtual machine for my build environment as it is relatively trivial to set up. I required:

  • Java JDK (7) and Maven (3) for building
  • git for source control
  • ssh for (among other things) generating keys for passwordless git interaction
  • gpg for signing build artefacts


See the Sonatype OSS Maven Repository Usage Guide for full instructions on how to deploy to a repo and promote to Maven central.

Aside from the configuration you see in the pom, my settings.xml ended up like this:

<settings xmlns=""


The library is available via this dependency:


The namespaces and license have changed from the previous form of the library but the functionality is largely the same.

No comments:

Post a Comment

All comments are moderated