List<PublicationAwareRepository> publishRepositories = collect(getRepositories(), Transformers.cast(PublicationAwareRepository.class));
try {
artifactPublisher.publish(publishRepositories, module, configuration, descriptorDestination);
} catch (Exception e) {
throw new PublishException(String.format("Could not publish configuration '%s'", configuration.getName()), e);
}
}