ng-cli.0.121.0.source-code.init-cli.qute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbang-cli Show documentation
Show all versions of jbang-cli Show documentation
JBang Command Line Interface
The newest version!
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS info.picocli:picocli:4.6.3
{#for dep in dependencies.orEmpty}
//DEPS {dep}
{/for}
{#if dependencies.isEmpty()}// //DEPS {/if}
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Parameters;
import java.util.concurrent.Callable;
@Command(name = "{baseName}", mixinStandardHelpOptions = true, version = "{baseName} 0.1",
description = "{baseName} made with jbang")
class {baseName} implements Callable {
@Parameters(index = "0", description = "The greeting to print", defaultValue = "World!")
private String greeting;
public static void main(String... args) {
int exitCode = new CommandLine(new {baseName}()).execute(args);
System.exit(exitCode);
}
@Override
public Integer call() throws Exception { // your business logic goes here...
System.out.println("Hello " + greeting);
return 0;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy