Is there anything I could do to get my own open source stuff into Maven's Central repository?
I've wondered many times how I could get my own projects into Maven's Central repository. I was asking this myself, especially as I've seen some well known projects hosting their own repository, requiring users to add dependency and repository. At the same time, it's getting difficult for other projects to depend on those projects. As I neither want others to add an additional repository nor to host one myself, I'm looking for other ways.
And why aren't some projects using the option to deploy to Maven Central in favor of their self-hosted repository? Any good reasons that aren't obvious?
Sonatype OSSRH (OSS Repository Hosting) uses Sonatype Nexus Repository Manager to provide repository hosting service for open source project binaries - be sure to review the full terms of service. OSSRH uses the Maven repository format and allows you to: deploy development version binaries (snapshots)
The best solution I've been able to find consists of these steps: Create a branch called mvn-repo to host your maven artifacts. Use the github site-maven-plugin to push your artifacts to github. Configure maven to use your remote mvn-repo as a maven repository.
As Domi mentiones, the easiest way is to use Sonatype's free hosting because to get your artifacts to Maven Central you must first upload them to an "approved forge" - such as Sonatype.
I've written a short guide that describes how to get started with Sonatype whether you use Maven or not to build your OSS project. They have their own guide but it isn't as clear as it should, so I've added those missing bits to my post and I link to the original guide where appropriate. Check http://theholyjava.wordpress.com/2010/02/07/releasing-a-project-to-maven-centr/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With