Import the ant1.xml and ant2.xml files into the ant3.xml file using the import or include command
<import file="ant1.xml"/>
Define targets in ant1 and ant2 files as default example below
<project default="compile-ant1">
<project default="compile-ant2">
This will be executed from ant3 as needed.
See here at http://ant.apache.org/manual/Tasks/import.html for more details.
source
share