printDependency(out, indent, groupId, dep.getArtifact(), version, dep.getType(),
dep.getClassifier(), dep.getScope(), dep.isOptional(), null);
}
// now print the dependencies listed in the ModuleDescriptor
ConfigurationScopeMapping mapping = options.getMapping();
if (mapping == null) {
mapping = DEFAULT_MAPPING;
}
for (int i = 0; i < dds.length; i++) {
ModuleRevisionId mrid = dds[i].getDependencyRevisionId();
ExcludeRule[] excludes = null;
if (dds[i].canExclude()) {
excludes = dds[i].getAllExcludeRules();
}
DependencyArtifactDescriptor[] dads = dds[i].getAllDependencyArtifacts();
if (dads.length > 0) {
for (int j = 0; j < dads.length; j++) {
String type = dads[j].getType();
String classifier = dads[j].getExtraAttribute("classifier");
String scope = mapping.getScope(dds[i].getModuleConfigurations());
boolean optional = mapping.isOptional(dds[i].getModuleConfigurations());
printDependency(out, indent, mrid.getOrganisation(), mrid.getName(),
mrid.getRevision(), type, classifier, scope, optional, excludes);
}
} else {
String scope = mapping.getScope(dds[i].getModuleConfigurations());
boolean optional = mapping.isOptional(dds[i].getModuleConfigurations());
printDependency(out, indent, mrid.getOrganisation(), mrid.getName(),
mrid.getRevision(), null, null, scope, optional, excludes);
}
}