Development Articles

Adding Maven Dependencies to an Ant Build System

We've got a somewhat large and scary build environment at work involving a healthy number of large ant scripts that include a bit too much copy pasted code. As such developers have started craving something better and there's been a push to start managing any new modules for the product with Maven.

Initially I was a little irritated by Maven when we started using it to manage Emo, mostly frustration with being told where to put everything, having no idea what Maven was doing under the hood, or any idea how to control it. I have to admit it's started to grow on me lately, (reading the POM Reference didn't hurt) and when the time came for my team to create a new module within the product we made the decision to go Maven.

Up until today our new module was disjoint from the main build process, but eventually the time comes to integrate the two, a process I hadn't given much thought to. Below are some quick notes on how to add a dependency on a Maven artifact in your source tree (including all it's dependencies Maven magically manages for you) to an existing Ant build process.

Elitist Software Development

Sadly life as a software developer seems to frequently entail a healthy dosage of bitching about bad code and bad architectural decisions. It can be misguided and unfair, we too frequently glaze over our own shortcomings while viciously attacking those of others, but raising issues is the only way to get anything fixed. As such learning how to walk the line between being negative and being constructive (as well as being honest with our own mistakes and shortcomings) is something I'm starting to consider a relatively important skill. Despite the fact that it can get out of hand, it also seems to be a characteristic of a quality developer, provided the bitching is the result of legitimate problems and not a senseless religious debate. It also needs to be backed up with a genuine desire to improve the code base, their skills, and accompanied by suggestions and willingness to carry through with them.

The following is a small collection of the most substantial do's and dont's I've accumulated thus far in my career and personal experience, or at least the ones that weigh most heavily on my mind at this point in time.

Syndicate content