I'm trying to find a way to run multiple Ant builds sequentially from the command line. I do not have the ability to edit the build files directly. Here is what I have:
@echo off
cd c:\my\first\buildfile\dir
ant -buildfile build1.xml target1 target2
cd c:\my\second\buildfile\dir
ant -buildfile build2.xml target1 target2 target3
I want to be able to use something similar to this for multiple projects. However, it currently only runs the first build (it seems to build both targets) but then stops, and doesn't continue to the next. I'm sure the solution to this is probably obvious, but this is the first time I've used Ant from the command line. I usually run it from inside Eclipse. How would I go about running multiple ant builds from within just one batch file, if it's even possible?
You can try the following: