When I generate a new Micronaut project using the mn
CLI tool or Micronaut Launch, it comes with a micronaut-cli.yml
file specifying an applicationType
, defaultPackage
, testFramework
, sourceLanguage
, buildTool
, and features
. Yet if I delete this file, alter it, or even replace it with invalid YAML, my project still seems to build and run just fine.
Presumably the mn
CLI itself can't possibly use this file for anything either, since it looks like it only supports project creation commands - nothing for editing existing projects. At least, I only see those when I run mn --help
in my home directory.
So what's micronaut-cli.yml
for? Does it actually affect anything at all? Or is it just a historical record of how the project was created?
Presumably the
mn
CLI itself can't possibly use this file for anything either, since it looks like it only supports project creation commands - nothing for editing existing projects.
It isn't true that the CLI itself can't possibly use the file. It does. It also isn't true that the cli only supports project creation commands. The CLI supports other commands. To see a list of commands available in your project, run mn --help
from inside the directory containing the micronaut-cli.yml
file.
So what's micronaut-cli.yml for?
It is a config file for the CLI.
Does it actually affect anything at all? Or is it just a historical record of how the project was created?
The former.
As an example set testFramework
to junit
and run create-test
. Then change testFramework
to spock
and run the same command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With