mavenintellij-ideamaven-profiles

How can I assign a specific maven profile to an intellij run configuration?


I have multiple projects loaded into my project structure and they all use different maven profiles. I know I can switch up the profiles using the Maven Projects tab but I would like to assign a specific profile to go along with a specific run configuration.


Solution

  • You can assign specific profiles via the dialog "Edit Run Configurations". See this screenshot:

    enter image description here

    AFAIK, this profile setting overrides the choice which you select in the maven view of IntelliJ.