6

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

Dims
  • 47,675
  • 117
  • 331
  • 600

2 Answers2

18

This is not a Maven profile but a Quarkus profile.

You need to use -Dquarkus.profile=prod or the QUARKUS_PROFILE environment variable.

See https://quarkus.io/guides/config#configuration-profiles for more details.

Guillaume Smet
  • 9,921
  • 22
  • 29
8

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

jreznot
  • 2,694
  • 2
  • 35
  • 53