15 Dec 2009 @ 10:41 AM 

Image via Wikipedia

Image via Wikipedia

My company is moving our build process from an Ant script to Maven.  This is going to make everything so much easier!  Whereas our Ant script required a bunch of projects to be checked out, configured just so, and deployed to attachable JARs, now all these projects can be stored in our repository manager and just be referred to by the parent POM as dependencies!

The challenge herein is to adapt my automation framework to use Maven instead of Ant.  This is essential for developer adoption, and also heightens my awareness of a tool that we intend to use to ensure the quality of our product.  Either of these are noble goals, but taken together, are too much impetus to ignore.

This transition requires quite a shift in perspective, and unfortunately, some additional planning I had avoided in true hacker style.  See, I was using Ant not only to build my application, but also to execute it (via the TestNG Ant task) and to produce test reports (via ReportNG).  I chose to go this route because: a) I was lazy, and b) I was inexperienced in software development.

Now, Maven may, with some tooling, allow me to preserve this approach.  But at what cost?  My super-custom build structure would undo much of the benefit of Maven; that of  ”convention-over-configuration“.  If my process is so specialized as to require a new developer on the project, or a new user of the artifacts, to read and understand the build process, then Maven will have cost me much and bought me little.

Rather than to port my build process to Maven, I’ll need to re-evaluate the structure of my application as a whole.  I’m considering splitting the project into the core framework and the application-specific implementation.  Instead of a task in the build tool, I’ll write an entry point class that kicks off the TestNG tests with my desired configuration.  Wrap the whole shebang into a JAR and upload it to the local Maven repository manager, and I’ve got a dependency that can be used during the integration-test phase.  Voila!


 Last 50 Posts
Change Theme...
  • Users » 1
  • Posts/Pages » 11
  • Comments » 0
Change Theme...
  • VoidVoid
  • LifeLife « Default
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Book Review

  • No categories

Uncategorized

  • No categories