I am working on some Ant scripts designed to be run inside the WebSphere Studio Application Developer (v4.0.3)
IDE. Because there are a number of tasks, e.g. refresh, rebuild, etc., that are applicable to all projects, what I want to do is 1) declare all my project names in one place (so I do not have to create task-specific code for each of the refresh, rebuild, etc. tasks), and 2) use a looping mechanism to execute each of these tasks for each project.
I have managed to get JavaScript working inside my Ant scripts and it appears this may solve my problems by 1) declaring the project types and names within JavaScript arrays, and 2) using a for loop within JavaScript to execute Ant targets repeatedly.
However, I am still working on some issues related to the execution of JavaScript from Ant targets and vice versa. But I am fairly confident that I will be able to get the Ant scripts to do what I want now although I still have to work out the details.