Thursday, September 29, 2011

Using ant as an alternative to make?

I'm a bit biased when dealing with build systems, because I've worked with the very simple make build tool.  Yes it doesn't have all the bells and whistles as ant does but it gets the job done and it was popular before build systems took off. (make was the original build system hipster)

I approached ant just like how I would approach women. I would try to RTFM look at example files and try to understand how it works by just reading the code.  The code I tried to analyze first was the XML files packaged in the PMJ.dacruzer folder. I took a look at the build.xml file, only to be stumped as to what the heck was going on after 30 minutes. However the structure of the build.xml file was similar to a make file, which led me to believe I was on the right path.  I attempted to try complete a couple of ant katas, as a way of getting my feet wet. The katas dealt with cleaning, compiling, javadocs and packaging a system.

Eventually I turned to the ant manual for more information. The manual has a lot of information but it was a bit difficult to understand what exactly was going on. I had also asked a couple of software developer friends of mine on some insight about some of these katas.

In the end I was able to finish all of the katas, except the packaging kata.  The difficulty I had with this kata was the creation of the zip file.  However from completing all the other katas I have learned a lot about ant. For example I learned about basic dependencies, immutable properties, and working with java files within ant. I still appreciate make but ant seems to provide software developers with a much more convenient tool than make. The fact that ivy and ant works together to provide a build system + dependency management tool for a software developer, is awesome.

0 comments:

Post a Comment