Slight elaboration on the starter build.xml file will give us a full build.xml file that is capable to generate code, compile, package, deploy and run the entire project.
Here's a pictorial depiction of the full build.xml.
As the build.xml takes shape, the directory structure of the project also become clear:
The source files, resource files, deployment descriptors, configuration files.
Directories for generated code, compiled code, a staging area for intermediate jars (the EJB jar that will go into the EAR), and the final deliverables (the EAR, and the client program.