// copy resource content
moduleDir.mkdirs();
File resFile = new File(moduleDir, symbolicName + "-" + version + ".jar");
IOUtils.copyStream(content.getContent(), new FileOutputStream(resFile));
ModuleIdentifier modid = ModuleIdentifier.create(symbolicName, version.toString());
// generate module.xml
File xmlFile = new File(moduleDir, "module.xml");
Map<Requirement, Resource> mapping = context.getResourceMapping();
String moduleXML = generateModuleXML(resFile, resource, modid, mapping);