return addAbstractResource(resource, writeXML);
}
}
private Resource getMavenResource(MavenCoordinates mavenid) {
MavenIdentityRepository mvnrepo = null;
Repository delegate = getRepository().getDelegate();
if (delegate instanceof MavenIdentityRepository) {
mvnrepo = (MavenIdentityRepository) delegate;
} else if (delegate instanceof RepositoryAggregator) {
RepositoryAggregator aggregator = (RepositoryAggregator) delegate;
for (Repository repo : aggregator.getDelegates()) {
if (repo instanceof MavenIdentityRepository) {
mvnrepo = (MavenIdentityRepository) repo;
break;
}
}
}
return mvnrepo != null ? mvnrepo.findMavenResource(mavenid) : null;
}