On Tuesday we had a very good session with the Knowledge Center for Web & Java on ANT, the Jakarta “make”-tool. We started with the usual roundup of everyones current activities and recent findings. We discussed the highlight in the area of Java/J2EE of the ODTUG 2004 and JavaOne 2004 conferences. Then Leon did an excellent job with an introduction to ANT, covering the basics and some interesting more advanced tasks. He demonstrated his use of ANT for local administration and also a number of AMIS usages of ANT on various projects. After the pizzas we did a small workshop with ANT 1.6.1. Starting with installation/configuration and the absolute basics, we quickly ended up in discussions on more exotic use for ANT. Hans was the first to implement his own ANT Task, which did absolutely nothing useful.
Some questions and ideas I took home from this session:
- – ANT is seen as a tool to help organize your development environment and deployment process; however, for any batch process that is part of the application, there is probably not a better way to implement than ANT. For example the automatic letter generation process we implemented for a customer last year or the nightly website generation at another customer or loading of the dataware house from XML-files. All such tasks can very easily be ‘programmed’ in ANT.
- – would it be possible to use ANT for more advanced (Struts-like) workflow by using return-values from a task (or target) to build conditional flow-logic. For example: a task can return values 0, 1, 2 (indicating e.g. success, failure and warning) Depending on the return value of the task, I would like to start either this or that task. I do not know whether that can be done
Other resources to look into:
- Brian Duffs Weblog on writing an ANT task against the JDeveloper project file
- programming x-com ANT InformationPage with a listing of ANT resources and tools
- Grand:Graphical Representation of ANt Dependencies
This is not something terribly orginal as there are already some great tools such as Vizant or AntGraph doing something similar. However, Grand has a completly different approach.
thank you I had a great time
Have you figured out whether or not returning a value from a task can be done? I’m finding myself trying to do this exact thing right now.