Monday, 26 April 2010

Automating project setup and environment configuration

Share
Build automation is something very obvious, nowadays all projects have repository + build tool + automated scheduled builds. It's not a best practice it's a common practice.

And what about automating project setup and environment configuration?

Imagine a new member joining your team or upgrading/migrating your application to a different machine (or a client machine). Is everything contained in your project's wiki? I don't think so. Wiki pages tend to be outdated. In fact they are up to date only when project starts :).

Many times there are some hidden truths that are obvious to some members of your team while they are a mystery to others (and for sure to new members).

Have you ever though about automating project setup and environment configuration?

Today I post some ideas which I have successfully implemented in my PhD system and many projects in which I was involved during my work as a Software Engineer.

These ideas are all about Java related technologies, but I'm sure the same things can be achieved using other enterprise-grade platforms (e.g., .NET).

Thursday, 8 April 2010

Bullet-proof Java process runner

Share
Last year I wrote a post about Validating WS-BPEL programmatically. I used external Apache ODE bpelc tool, but I invoked it using Java's ProcessBuilder and Process classes.

A friend of mine, Tomek, warned me about problem I might come across by not reading error and input streams.

He was right, some time ago while working on Nuntius 0.5 I wrote an integration test whose goal was to detect WS-BPEL errors. The error output generated by bpelc was so large that my process blocked itself and waited for the error stream to be read.

Today I present a bullet-proof version of my process runner. You can easily refactor this class to run any command line tools from Java.