2.1.5 Building from Source
Clone the repository as follows:
$ git clone https://github.com/micronaut-projects/micronaut-core.git
cd
into the micronaut-core
directory and run the following command:
$ ./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
export MICRONAUT_HOME=~/path/to/micronaut-core
export PATH="$PATH:$MICRONAUT_HOME/cli/build/bin"
Reload your terminal or source
your shell profile with source
:
> source ~/.bash_profile
You are now be able to run the Micronaut CLI.
$ mn
| Starting interactive mode...
| Enter a command name to run. Use TAB for completion:
mn>
You can also point SDKMAN to local installation for dev purpose using following command sdk install micronaut dev /path/to/checkout/cli/build |