}
private void addModuleDependencies(Resource resource, Map<Requirement, Resource> mapping, StringBuffer buffer) {
buffer.append(" <dependencies>");
for (Requirement req : resource.getRequirements(IdentityNamespace.IDENTITY_NAMESPACE)) {
Resource depres = mapping != null ? mapping.get(req) : null;
if (depres != null) {
ResourceIdentity identity = depres.getIdentity();
String modname = identity.getSymbolicName();
Version version = identity.getVersion();
String slot = version != Version.emptyVersion ? "slot='" + version + "'" : "";
buffer.append("<module name='" + modname + "' " + slot + "/>");
LOGGER.info(" {}", identity);