Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Deploy my Open Source Projects using Maven's Central Repository? [closed]

Tags:

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?

like image 794
sfussenegger Avatar asked Nov 02 '09 17:11

sfussenegger


People also ask

What is Ossrh?

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)

How do I host a Maven repository?

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.


1 Answers

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/

like image 161
Jakub Holý Avatar answered Oct 06 '22 09:10

Jakub Holý