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

2

35

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.

Assign answered 23/6, 2016 at 20:34 Comment(0)
T
24

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.

Tumid answered 9/7, 2016 at 13:33 Comment(0)
E
42

If You have created maven profiles in your pom.xml, you should be able to see the profiles in right side of Intellij Idea

You can select this profile

If there will be multiple profile you can activate one by default

           <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

Or for running specific profile we can select mvn install -Pbuild-profile

Earing answered 24/6, 2016 at 5:9 Comment(1)
This window can be found from menus View | Tool Windows | Maven ProjectsInspiratory
T
24

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.

Tumid answered 9/7, 2016 at 13:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.