Developing OpenSource is fun and is supported by a wide range of companies with free infrastructure.
In this articel I want to show how you can build a free development environment for your open source
project. Some stuff is Java (or more general JVM) specific, but some stuff can be applied to any project.
Source Code Hosting
There are three big hoster I know, which do a real good job: GitHub, GoogleCode and Bitbucket.
For my projects I prefer GitHub as it focuses only on git and provide a good integration with some
other tools I use.
What GitHub offers
- Obviously a git repository to host your source code
- A nice landing page on your repo (README.md), which is always nice
- Optional wiki (awesome for tutorials)
- Optional issue tracker (just a small set of features, but enough for most projects)
- Milestones, Label and schedule support
- Eclipse Mylyn integration with the issue tracker (Markdown WikiText support will be added soon)
- Pull Request, which is great feature for collaboration with external contributors
- GitHub Pages (more on that later)
- Android App
So basically you have everything to get started within GitHub. 300Mb free space (soft limit) for
your projects. You can really code a lot with 300Mb.
Using a build tool should be obligatory for an open source project. Let explain why:
Of course, it’s easier for you to checkout your IDE files inside the repository, because at the beginning it will only be you, coding in your project. However your favorite IDE maybe not my favorite IDE and now you must create all the IDE specific files yourself, which can be sometimes a though task.
Unique build process
There are no excuses „my project doesn’t“ compile as the build process is describe in a build file and
will be executed the identical way on every machine. Of course this implies you don’t hardcode some
paths, which only exists on your machine.
Ah, such a magic word. Continuous Integration isn’t possible without a build tool, as every build server
needs some hints how to build this project.
Maven is my favorite build tool. I know there a plenty of other build tools outside like sbt, gradle, ant + ivy.
However as far as I experience some of them, maven is more verbose, but has a huge ecosystem with
a lot of tutorials, plugins and nice features. Some of them are
- One build file pom.xml
- Good IDE integration for most IDEs, but commandline is handsome, too.
- Writing your own plugins is straightforward
- Open source repository server Nexus OSS
- Maven Central to publish your projects
- Site generation for an easy project site.
Pushing your changes to repository doesn’t necessary involve that you run all your tests. However
this should be done! For this travis-ci is great platform. It integrates very smoothly with github.
You see the build-status of your project on pull-request and can integrate the build-status very
easily in your README.md or on any other website.
Deploying your stuff
Of course at some point, you want to publish your stuff. Upload your jars is a possible way
and should be done, as nobody wants to compile your library for himself (yeah, so guys really
love this, but that’s not the majority). Maven Central is definitively the right place to do this.
There is very good tutorial how to get an account and publish your stuff. The process includes
PGP signature generation and getting a bit more familiar with maven release process, but it’s
definitely worth it. And here the circle closes. You can use your projects now in any other
project you create like any other can.
A small website would be nice
If the github README and the wiki is not enough, github has one more gift for your: Github Pages
As we use maven, we can create a nice site with mvn site which can be customized and some
useful reports such as unitTest, checkstyle and findbugs can be added.
GoogleGroups is the first choice. Found nothing better yet.
Show me a project
My current project I spend time on can be found here. Only the mailing list is currently not on
google groups as there is a legacy mailing list.