currentPath = CommonUtil.computeServicePathWithVersion(currentPath, "1.0.0-SNAPSHOT");
}else{
currentPath = CommonUtil.computeServicePathWithVersion(currentPath, version);
}
if (registry.resourceExists(currentPath)) {
GovernanceArtifact oldArtifact =
GovernanceUtils.retrieveGovernanceArtifactByPath(registry, currentPath);
if (!(oldArtifact instanceof Service)) {
String msg = "The updated path is occupied by a non-service. path: " +
currentPath + ".";
log.error(msg);
throw new Exception(msg);
}
// id is used to differentiate the service
String id = oldArtifact.getId();
service.setId(id);
serviceManager.updateService(service);
Resource serviceResource = registry.get(service.getPath());
String oldLifeCycleName = serviceResource.getProperty("registry.LC.name");
if (lifeCycleName == null) {