//Loading the metadata repository
metadataRepositoryManager.loadRepository(location, null);
metadataRepositoryManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, nickName);
//Loading the artifact repository
artifactRepositoryManager.loadRepository(location, null);
artifactRepositoryManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, nickName);
} catch (Exception e) {
throw ProvisioningException.makeExceptionFromErrorCode(
CompMgtMessages.FAILD_TO_ADD_REPSITORY, e, location);
}