IPath output = outputPath.append(module.getName() + getModuleExtension(module));
try {
IModuleResource[] resources = getModuleResources(module);
PublishUtil.publishSmart(resources, output, new NullProgressMonitor());
if(GeronimoUtils.isEarModule(module)) {
IEnterpriseApplication application = (IEnterpriseApplication) module.loadAdapter(IEnterpriseApplication.class, null);
if( application != null ){
IModule[] children = application.getModules();
for (int i = 0; i < children.length; i++) {
IModule child = children[i];
IPath childPath = output.append(child.getName() + getModuleExtension(child));
IModuleResource[] childResources = getModuleResources(child);
PublishUtil.publishSmart(childResources, childPath, new NullProgressMonitor());