@CliCommand(value = DEPLOY_JOB, help = "Deploy a previously created job")
	public String deployJob(
			@CliOption(key = { "", "name" }, help = "the name of the job to deploy", mandatory = true, optionContext = "existing-job undeployed disable-string-converter") String name,
			@CliOption(key = { PROPERTIES_OPTION }, help = "the properties for this deployment", mandatory = false) String properties,
			@CliOption(key = { PROPERTIES_FILE_OPTION }, help = "the properties for this deployment (as a File)", mandatory = false) File propertiesFile
			) throws IOException {

		int which = Assertions.atMostOneOf(PROPERTIES_OPTION, properties, PROPERTIES_FILE_OPTION, propertiesFile);
		Map<String, String> propertiesToUse;
		switch (which) {
			case 0:
				propertiesToUse = DeploymentPropertiesFormat.parseDeploymentProperties(properties);
				break;
			case 1:
				Properties props = new Properties();
				try (FileInputStream fis = new FileInputStream(propertiesFile)) {
					props.load(fis);
				}
				propertiesToUse = DeploymentPropertiesFormat.convert(props);
				break;
			case -1: // Neither option specified
				propertiesToUse = Collections.<String, String> emptyMap();
				break;
			default:
				throw new AssertionError();
		}

		jobOperations().deploy(name, propertiesToUse);
		return String.format("Deployed job '%s'", name);
	}
Job commands.

@author Glenn Renfro
@author Ilayaperumal Gopinathan
@author Gunnar Hillert
@author Eric Bottard
spring-xd-shell/src/main/java/org/springframework/xd/shell/command/JobCommands.java