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