Friday, March 6, 2009

Hudson and Doxygen

I wrote an article last year for Javalobby and couple more blogs on Doxygen called "Javadoc or Doxygen". Doxygen is a documentation tool for many languages such as Java, C, C++ and so on. In that article, I show how to use Doxygen for generating technical documentation based on your source code, keep this up-to date by adding additional tasks to Ant build files, and run them from your CI Server(Hudson in my case) on commit and nightly builds, and also publish the results.

It sure was easy and needed just 3 steps. However, while preparing for my presentation for SD West next week, I saw that Hudson has a neat plug-in for Doxygen. So, here is another way of generating your documentation on a daily basis in 3 simple steps.

1. Download the Doxygen plug-in for Hudson. This is quite easy if you already have Hudson up and running. Just click on the '"Manage Plugins" link, and in the available list check Doxygen and install. Restart hudson for this plugin to become available.

2. Next, configure the plug-in within your Hudson job. As shown below:

3. Finally, if you have configured the Doxygen config file earlier, just force a build and see your updated docs on the dashboard of your project. No XML file, no Ant targets. Isn't it cool?

Just 3 simple steps, how much easy can generating documentation be? Now you know why I am so crazy about Hudson. Don't you agree?

As always, keep me posted if you need any help. You sure won't. But, in case....


  1. Hi Meera,
    are you sure that you do not have to run doxygen from an ant task when making use of this plugin? As far as I know the plugin does NOT run doxygen at all but only analyzes the Doxyfile for the correct location of the (prior generated) output and provides a link for it. Hence, setting up (and running) the ant task is still necessary and can be done as you pointed out in your nice article.

  2. Oh really. I will have to give a try. Thanks for letting me know, Stephan.

  3. Hello Meera -

    Thank you for the wonderful posts!

    I was trying to do the Doxygen plugin on hudson. Completed Step1 and I can see the doxygen plugin checked on my manage plugin page. But when I get to my job- configure page... I cannot see the UI part for 'Publish Doxygen' mentioned in Step: 2. We are using Hudson version 1.297.

    Thank you,

  4. Shyla.
    Get the latest Hudson. It might help.

  5. You have forgotten to precise that doxygen must already be installed before using the doxygen plugin in Hudson. Once you installed doxygen on the computer, you can type the following command line to generate the required Doxyfile required by the Hudson's job:
    >doxygen -g

    Anyway, a doxygen manual is available to download on the doxygen website ( along with the doxygen installer for both Linux and Windows.

  6. I've also just discovered Hudson and think it's v cool.

    Trying to setup with Doxygen on a slave but seem to be hitting a wall. Doxygen plugin crashes (hudson.AbortException) if the output folder doesn't already exist on slave (but if run Doxygen from command line, it creates the folder for you).

    However, if I create the exact folder on slave then it complains about not being able to copy the generated HTML from "null" to the hudson directory (which should be on the master not the slave!

    Am running on WinXP and using Hudson 1.3.76 and Doxygen plugin 0.6.

  7. Hello Meera,
    Thanks a lot for your nice articles.