Building Quarkus apps with Quarkus Command Line Interface (CLI)
Installing the CLI
The Quarkus CLI is provided as a native binary for Linux and macOS or as a jar-file for all operating systems.
Native CLI
Download the binaries here:
-
Linux Binary (coming soon)
-
macOS Binary (coming soon)
We recommend that you create a specific Quarkus folder, eg '~/quarkus' and move the binary there. Then in your shell profile (for Bash shell edit '~/.bash_profile'), export the 'QUARKUS_HOME' folder and add that to your 'PATH':
export QUARKUS_HOME=/path/to/quarkus-cli
export PATH="$PATH:$QUARKUS_HOME"
Reload your terminal or do:
source ~/.bash_profile
Now you can run the Quarkus CLI:
$ quarkus --help
This will display the help information with all the available commands.
$ quarkus -i
This will start the Quarkus CLI in interactive mode.
Jar CLI
Download the jar-file here: * jar-file (coming soon)
As with the native CLI we recommend that you copy the binary to a specific folder, eg '~/quarkus'. The jar file requires Java 8 or newer to run. To start the CLI:
$ java -jar quarkus-cli.jar
The jar file CLI accepts all the same options and commands as the native binary.
Note: In the examples below switch out 'quarkus' with 'java -jar quarkus-cli.jar'.
Creating a new project
To create a new project we use the create-project command:
$ quarkus create-project hello-world
This will create a folder called 'hello-world' in your current working directory using default groupId, artifactId and version values (groupId='com.acme', artifactId='quarkus' and version='1.0.0-SNAPSHOT').
To specify the groupId, artifactId and version values, use the '--groupid', '--artifactid' and '--version' options:
$ quarkus create-project --groupid=com.foo --artifactId=bar --version=1.0 hello-world
Use the help option to display all the possible options:
$ quarkus create-project --help
Dealing with extensions
The Quarkus CLI can obtain a list of the available extensions with:
$ quarkus list-extensions
To more easily get an overview and only display the extension names:
$ quarkus list-extensions -n