Custom Maven settings are ignored
Hi everybody,
I have a problem with the custom maven settings.
I use my computer for work and personal projects. Naturally, I want those two worlds separated from each other. So, in my Maven-Project settings I have entered the following values for one of my PRIVATE Projects:

This being the settingsfile (provided by my artifactory):

IntelliJ seems to ignore those settings. It seems the default settings file in "C:\Users\<user>\.m2" is always used.
Because, when I run maven (from within IntelliJ) with goal "clean package"

The company server is always used. There are no proxy servers or anything configured which might reroute my request. I have also experienced this from @home.
I first thought it is a bug and might be fixed soon. But this has happened for over a year now, so I think, I might be doing something wrong.
Also no artifacts are downloaded to the custom repository-folder.
Does anybody know how to solve this?
Thank you very much!
Best,
Michael
Please sign in to leave a comment.
Hello Michael,
Seems we have similar requests on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-52486, https://youtrack.jetbrains.com/issue/IDEA-136395, https://youtrack.jetbrains.com/issue/IDEA-127305
Don't you have "M2_PATH" variable set in OS?
Hello Yaroslav,
I am terribly sorry for the late reply, I was on vacation for some time now and had a high workload, when I came back.
I tried to set M2_PATH and M2_HOME now, but to no avail. The command issued by IntelliJ when the maven process is started is the following:
In my Opinion the user-Settingsfile is missing in this call, if "override" is checked. This would be something like
Please vote for this issue: https://youtrack.jetbrains.com/issue/IDEA-166074. Check the workarounds mentioned in the issue. Try also https://youtrack.jetbrains.com/issue/IDEA-182782#focus=streamItem-27-2556749-0-0
Thank you, Andrey for the workaround.
This seems to work fine now. Is there any estimation on if and when this bug is going to be fixed?
Currently there is no ETA on this. Please vote the https://youtrack.jetbrains.com/issue/IDEA-166074 issue.