# Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 job "java_exec" { constraint { attribute = "${attr.kernel.name}" value = "linux" } group "group" { update { min_healthy_time = "2s" } reschedule { attempts = 0 unlimited = false } restart { attempts = 0 mode = "fail" } task "build" { lifecycle { hook = "prestart" sidecar = false } driver = "exec" config { command = "javac" args = ["-d", "${NOMAD_ALLOC_DIR}", "local/Sleep.java"] } template { destination = "local/Sleep.java" data = <