2.1.5 Building from Source

Clone the repository as follows:

  1. $ git clone https://github.com/micronaut-projects/micronaut-core.git

cd into the micronaut-core directory and run the following command:

  1. $ ./gradlew cli:fatJar

This created the fatJar for use in the CLI.

In your shell profile (~/.bash_profile if you are using the Bash shell), export the MICRONAUT_HOME directory and add the CLI path to your PATH:

bash_profile/.bashrc

  1. export MICRONAUT_HOME=~/path/to/micronaut-core
  2. export PATH="$PATH:$MICRONAUT_HOME/cli/build/bin"

Reload your terminal or source your shell profile with source:

  1. > source ~/.bash_profile

You are now be able to run the Micronaut CLI.

  1. $ mn
  2. | Starting interactive mode...
  3. | Enter a command name to run. Use TAB for completion:
  4. mn>
You can also point SDKMAN to local installation for dev purpose using following command sdk install micronaut dev /path/to/checkout/cli/build