Friday, January 16, 2009

Eclipse: Build Product, Coverage and lot of Reports.

Continous Integration

Continuous integration is a practive where developers integrate their work frequently. This help the team increase their productivity by detecting the integrating errors as early as possible during the development. There are a lot of build tools which helps in automating the build process with different reports which helps the developers to increase their work productivity.

Ant, Maven

Ant and Maven are two build tools which are very widely used in the java build process. Though ANT is a old and little complicated tool than the Maven, it gives the flexibility to do the build for any kind of software application.
Maven works great for almost all kinds of java application like web application, desktop applications. Maven also generates a whole lot of reports which helps the team at various levels to see the progress of the development.

Building Eclipse Products

Building eclipse product is always a difficult job if you want to do it outside the Eclipse Environment. And especially building eclipse product with maven not so easy work. Though there are existing plugins which does the product build little easier, they are not as efficient as the ANT counter part.

Since eclipse requires its own run time environment for building and running, the Maven structure does not help a lot. The following maven plugins does help in building eclipse plugins

But running the test cases and generating different reports based on this is a difficult process using the above tools.

Combining ANT and Maven

PluginBuilder is a eclipse plugin which provides an easy mechanism to create the ANT build scripts for building eclipse plugins, running test cases, and building the product. And it works out of the box.

Download it from http://www.pluginbuilder.org/

Create your plugin project with the test cases in a separate fragment project.

Create the build.xml and other supporting files for the ANT Build which creates Product, Test Report and Test Coverage Report.

Configure a ANT build step on the Automated build tool such as Luntbuild.

Now for the usual Maven reports and site generation we can use the Maven PDE plugin without the test option. This should not include the test fragments in build path.

This is it. You get a Product file, Unit Test Reports, Unit Test Coverage and all maven reports deployed as a site.

This tutorial doesnt give you step by step procedure but if you need help doing anything above. Just drop in a comment.

No comments: