This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I was reading my copy of GinA this evening and looking at the builders section and Ant Scripting. I like how logic in build files are really concise using groovy so I am working on converting a few of my build scripts from XML to groovy to see how it goes.
I'm curious on a coupld of aspects during the conversion. One being properties. What is the best practice in this regard? Should we do as GinA did:
CLASSES_DIR = 'classes' ETC_DIR = 'etc'
Or is there a different, more AntBuilder way?
Also, is there a way that I can execute my groovy ant script and call a specific task? My initial thought was to grab an argument and determine a method in a Build class. But not sure about best practice here.
And lastly, for now, what is the best way to read in a properties file and make these properties available to the rest of the script? The current ANT way would be something like:
And now all my tomcat.properties are available via ANT's EL.