CLI Project Commands
Create-Command
Flag | Description | Example |
---|---|---|
| The language used for the command |
|
| Whether to overwrite existing files |
|
The create-command
command generates a standalone application that can be executed as a picocli Command. It follows a *Command
convention for generating the class name. It creates an associated test that runs the application and verifies that a command line option was set.
$ mn create-command print
| Rendered template Command.java to destination src/main/java/example/PrintCommand.java
| Rendered template CommandTest.java to destination src/test/java/example/PrintCommandTest.java
This list is just a small subset of the code generation commands in the Micronaut CLI. To see all context-sensitive commands the CLI has available (and under what circumstances they apply), check out the micronaut-starter project and find the classes that extend CodeGenCommand
. The applies
method dictates whether a command is available or not.