// un-register the repository if it's not local registered
if (!localRegistered)
featuresService.removeRepository(new URI(url));
// broadcast the cluster event
ClusterRepositoryEvent event = new ClusterRepositoryEvent(url, RepositoryEvent.EventType.RepositoryAdded);
event.setInstall(install);
event.setSourceGroup(group);
eventProducer.produce(event);
} else {
throw new IllegalArgumentException("Features repository URL " + url + " already registered");
}
} finally {