def METHOD_NAME(ctx, singlejar, inputs, output):
    args = ctx.actions.args()
    args.add("--output", output)
    args.add_all(inputs, before_each = "--sources")
    ctx.actions.run(
        mnemonic = "BuildMavenJar",
        inputs = inputs,
        outputs = [output],
        executable = singlejar,
        arguments = [args],
    )