private void addEjbReferencesToWar(File theWar)
throws JDOMException, MojoExecutionException
{
try
{
EarArchive ear = new DefaultEarArchive(
new FileInputStream(srcFile));
ApplicationXml appXml = ear.getApplicationXml();
Iterator ejbModules = appXml.getEjbModules();
while (ejbModules.hasNext())
{
String module = (String) ejbModules.next();
EjbArchive ejbArchive = ear.getEjbModule(module);
EjbJarXml descr = ejbArchive.getEjbJarXml();
Iterator vendorDescrIterator = descr.getVendorDescriptors();
if (vendorDescrIterator == null
|| !vendorDescrIterator.hasNext())
{