How to choose quarkus profile when running app under Idea?

Viewed 5549

When running my app from within Idea, I see command line ends with

... -Ddebug=38605 quarkus:dev 

and dev profile is active. It doesn't depend on whether I press debug button or run button.

How to switch to prod profile? If I go to run configuration and enter

enter image description here

the command line changes to

... -Ddebug=38605 quarkus:dev -P prod

and the profile remains dev

2 Answers

You should use Runner - VM Options = -Dquarkus.profile=prod to specify quarkus profile in IntelliJ IDEA Run Configuration.

Quarkus Profile set in VM Options

There is an issue in IntelliJ IDEA tracker, probably it should be simpler: https://youtrack.jetbrains.com/issue/IDEA-259900

Related