I am very exited today.
Today I did an actual contribution to the open source community.
I helped publishing Java libraries to maven central.
The library we published is a plugin for dropwizard that uses quartz:
You can check it out. The README explains how to use it.
In this post I will not explain the plugin, but I will share my contribution experience to an open source project.
Why Even Contribute
There are so many reasons. Google is full of them.
I did it because I really wanted to help the community (In this case, the originators of the code).
It improves my skill-sets. I know now more than I knew before.
Exposed to technologies and processes which I usually don’t use.
Part of my digital signature and branding.
Why This Project
I know about dropwizard for more than a year.
I didn’t have the chance to use it at work.
I did some experiments with dropwizard to get the filling of it.
In one of my POCs, I wanted to create a scheduling mechanism in the micro-service I created.
By searching Google, I found this project.
First of all, I liked what it does and how.
I also liked the explanation (how to use it). It’s clear and I could work with it immediately.
I think the developers did a good job.
How It (my contribution) All Started
But one thing was missing. It wasn’t in maven repository (central or any other public repository).
So I asked whether the developers plan to publish it.
Issue #10 in the repository shows my question and the beginning of the conversation.
Issue 10, question from 2015/02/24
Basically the problem was the time to spend in order to comply requirements. The code itself was working.
I took upon myself to publish it to public maven repository.
I have never done something like that, so I wasn’t sure what to do.
I thought of using bintray by JFrog.
Eventually I decided to use sonatype. It felt more comfortable. So I started reading about OSSRH (Open Source Project Repository Hosting).
There’s an explanation for that below.
I forked the code to my GitHub account and used pull requests in order to merge the code I pushed.
I mostly modified the pom files so comply Sonatype requirements as explained in the tutorials.
Once we were all set, I did the actual publishing.
And now it’s there. Everyone can use it.
At first I was extra careful with any change. After all, “it’s not my code”…
Over time, I felt more comfortable modifying and pull requesting.
How To Upload to Sonatype
I used the tutorials, which explain clearly what to do.
- Create a user at OSSRH
- Open an issue with links to GitHub. Group ID and artifact ID
- Follow instructions (In our case, I had to modify the maven’s groups ID)
- Add the correct plugins to the pom file
pgp – read it carefully