ContainerMatcher containerMatcher) throws Exception {
transitionToDeploying(moduleDeployment.deploymentUnit);
Collection<Container> matchedContainers = containerMatcher.match(moduleDeployment.moduleDescriptor,
moduleDeployment.runtimeDeploymentProperties, containerRepository.findAll());
if (matchedContainers.isEmpty()) {
throw new NoContainerException();
}
return moduleDeploymentWriter.writeDeployment(moduleDeployment.moduleDescriptor,
moduleDeployment.runtimeDeploymentProperties, matchedContainers.iterator().next());
}