Tuesday, September 30, 2008

MiR: September 2008

September was another busy month, so busy that I haven't had time to update my blog as much as I'd like too. I've been involved in a lot of the behind the scenes work that goes into project testing infrastructure, the dividends of this work will however trickle back as more developer time can now be devoted to handling issues as their discovered (the return on investment on xharness CPIs are always worth the time).

Cheers.

Saturday, September 20, 2008

Maven integration for Eclipse

I've been getting into using Eclipse more this month, moving away from my normal vi/vim/nano way of doing things. Its not that I'm particularly against IDEs, its  just that I  spend most of my time remotely connected to AIX, HP-UX, Solaris, and other *nix machines quickly editing files and hence find light weight (resource wise) editors more sensible. When it comes to working with large code bases however my use of these editors slows my progress down considerably.

The only thing that was holding me back from setting up Eclipse with the projects I like to work on has been getting all the code to load correctly and not end up with loads of errors due to not having all the jars loaded. Now however I've started to use m2eclipse to automatically setup my projects.

The project is by all means not new, many of you are probably already quite familiar with it. In case your not however here is a quick introduction to setting up a maven based project in Eclipse.
  • Goto the Maven Integration for Eclipse site (http://m2eclipse.codehaus.org) and install the components required for your Eclipse installation. Alternatively use Eclipse's find & install feature to acquire the plugin.
  •  Once installed follow the next three steps to load your project:
  1. Click File -> New -> Other...
  2. Select "Maven -> Checkout Maven Projects from SCM." from the list.

  3. Select the SCM option for your project, then provide the URL to the SCM, click finish.


Your project resources will now be downloaded and setup :)

Hope this little demo was useful, cheers.

Wednesday, September 3, 2008

Responses: How to contribute to Apache?

In response to a question left on my last post I'll present my quick introduction to contributing to Apache projects (using Apache Servicemix as an example):

Contributing to an Apache project:

The Apache Software Foundation (ASF) is a volunteer based organization. They provide the infrastructure for each ASF project (mailing lists, code repositories, bug tracking systems, etc). The main way for people to become involved with ASF project is to contribute time to their favorite project.

So what kind of contributions can I make as a person with (next) to no knowledge of the inner workings of Apache?

Taking Apache Servicemix as my favored example, there are many ways to begin contributing:

1. First off you should become familiar with the project by downloading it, installing the application and trying out it's examples. Following the project's online documentation will assist you in understanding what's happening behind the scenes.

Servicemix can be downloaded here:
Servicemix documentation can be found here:

2. The next step is to start following the project's mailing list & forums. People tend to be quite friendly and helpful, this is an invaluable part of the community support you always hear about open source projects.

Servicemix mailing lists link here:
Servicemix forums list link here:

3. Now that you've tried out the project, and have listened to some of the discussions involving the project you should visit the project's issue tracker. As a contributor this is the place to report issues (Note: you'll have to setup an account to make submissions - this is a quick & easy process however). Reporting issues is one of the fastest ways to begin contributing.

Servicemix issue tracker here:

4. If you feel comfortable with source code then I would suggest checking out the code branch corresponding to the release you've installed. Follow the build instructions for your project, typically this will consist of typing "mvn install" in the root directory of the project.

Servicemix source here:
Servicemix build information here:

5. Now that you've become familiar with the project, spent some time reviewing reported issues, and have learned to build the application, you should now be ready to start contributing code :)
So how do I contribute code?
  • Select an open issue from the project's issue tracker. At first it may be best to select an issue described as 'minor'. If you check out the bottom of the Servicemix contributing page you will see that the team keeps a running list of issues they'd like to see resolved.
  • After reviewing the issue begin working on a solution (the fun part to many of us).
  • Once you believe that you have created a suitable solution create a matching unit test (if applicable).
  • Use the project's source control tool to produce a diff of the files involved.
  • Submit the diff file to the issue tracker, then email the project's developers mail list to alert them of the submission.
Once you've submitted a patch you will have to wait for an project member with committer status to review, then apply your patch to the source tree. Over a period of time if you continue to contribute high quality patches to the project you may get approached to become a committer yourself (see ASF project specific details for more information). One important note on submitting patches that you should be aware of is that for inclusion of patch one will have to approve ASF license grant, that is to say that your contributing this code under the Apache license. You can learn more about the Apache license here.

I hope the above guide is helpful, each project has its own variations so please read their online documentation carefully.

Cheers,