How to automatize maven projects reload
Answered
Hello.
I'm working on a Spring boot project that have several maven profiles:

We have a dedicated Git branch per environement, develop branch for dev env, release branch for staging env, etc.
My usual flow when I need to change env is as bellow:
1) Checkout the branch I need
2) Select the associated maven profile from the list (see first screenshot)
3) Reload all maven projects:

4) Then I am able to launch my server:

If I don't do step 3, maven projects reloading, the maven profile is not applied and the deploy fails. Is there a way to automatize this step in a "before launch" task? I tried maven goal "dependency:resolve" but it's not working.
Thank you!
Please sign in to leave a comment.
Hello,
"Reload" should be executed automatically on selecting profile in 2023.3 version: https://youtrack.jetbrains.com/issue/IDEA-247509