Belgium
Nov - 07

25

Keeping your Java Coding standards up using CheckStyle

Posted in Java & Eclipse, Work on November 25th, 2007 by Nicolas

In some circumstances it is useful to follow some coding guidelines. Most companies that produce software have such guidelines defined and enforced. But how do we check that these guidelines are all being followed? Opening all the source files one by one to check them visually by reading code is a time consuming task not many people would accept doing. Even if a developer accepts such practice, he’ll certainly not enjoy its job if he has to correct all the errors he sees there!

Thankfully, a nice little tool exists for automating such job. Let me introduce CheckStyle, a nice utility that takes a coding style guidelines’ file described in XML and then runs through your sources in order to generate reports on what needs to be changed to be compliant to the rules. As an example, the Sun’s Java developer standard coding guidelines are included in an example XML file.

It gets even nicer as this tool can be included in your ant build script and integrated with cruisecontrol’s automated build system generating graphs of your CheckStyle performances in order to have you forced to keep coding standards up! A plugin exists for the eclipse IDE so each developer can check its source before commiting.

Moreover, it is possible to have an SVN pre-commit hook setup so that no developer can commit code that does not comply to the coding guidelines that you’ve decided upon!

Nov - 07

25

Automating software compilation, test, packaging and delivery with Ant

Posted in Java & Eclipse, Work on November 25th, 2007 by Nicolas

Ant is a great tool for working with Java projects.project-logo

In fact, maybe the need for it does not come as an evidence to you if you’ve been using an IDE like eclipse which does all the path resolution and compilation by some kind of magic! However, when not all developers on a project use the same IDE or if you want to have your source on an automated build system, you’ll find ant very powerfull. With ant, I’m able to have an automated build system compile all my sources, run all my jUnit tests, generate Javadoc, several JARs (with javadoc, with source, without javadoc, …) and run a CheckStyle utility on the source ! Moreover, I can run all this by typing a single command: ant

Read more »

Tags:
Nov - 07

25

Eclipse Mylyn : Context-centric approach to integrating bug reports, tickets and eclipse

Posted in Java & Eclipse, Work on November 25th, 2007 by Nicolas

The Mylyn plugin for eclipse is a rename of the Mylar eclipse plugin. It has become so popular that it is now shipped in the main distribution of Eclipse for the Java developper.

Mylyn provides a context-centered approach to task management. It can be coupled with most of the popular task management (bug report) systems available such as Trac and Bugzilla which which it can be fully integrated.

Read more »

Nov - 07

25

Cruisecontrol & Continuum : Setting up a continuous build for java projects

Posted in Java & Eclipse, Work on November 25th, 2007 by Nicolas

cruisecontrolIn Agile software development, unit testing and trying to have software that “works” at all times is one of the central goals. In order to help you doing this, several systems exist in order to perform “continuous integration”. What those systems basically do is that they check your repository (SVN, CVS, bazaar, …) for changes and each time that it is required, perform a build of the system using the build system that you’ve decided (Ant, Maven, Shell Scripts, Makefile, etc….). The results of the Unit testing, and style checks performed by your build system can then be merged and transformed into a nice website so you can check on what is happening, get detailed build reports, download the latest JARs, etc…

CruiseControl has several hooks that allow you to have a mail go out when a build fails, then have another one go out when the problem is fixed. This is perfect for keeping an overall view of your software projects and knowing their “administrative health” at all times.

continuum_logo_75Continuum Continuum is the Apache software foundation’s response to CruiseControl, it basically does all that CruiseControl does, however, it requires a J2EE Application Container (Tomcat of J2ES 5) in order to be deployed. CruiseControl comes with a bundled Jitty (lightweight tomcat) which is lighter and easier to deploy if you don’t already have the infrastructure setup.