ModelNode domainDeployment = domainModel.require(DEPLOYMENT).require(name);
ModelNode deploymentContent = domainDeployment.require(CONTENT).clone();
if (remoteRepository != null) {
// Make sure we have a copy of the deployment in the local repo
for (ModelNode content : deploymentContent.asList()) {
if ((content.hasDefined(HASH))) {
byte[] hash = content.require(HASH).asBytes();
File[] files = domainController.getLocalFileRepository().getDeploymentFiles(hash);
if (files == null || files.length == 0) {
remoteRepository.getDeploymentFiles(hash);