Custom Maven settings are ignored

Answered

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

 

0
5 comments

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?

 

 

0
Avatar
Permanently deleted user

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:

"C:\Program Files\Java\jdk-11.0.1\bin\java.exe"
-Dmaven.multiModuleProjectDirectory=X:\dev\projects\<projectname>
-Dmaven.home=C:\Users\<username>\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\183.4588.61\plugins\maven\lib\maven3
-Dclassworlds.conf=C:\Users\<username>\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\183.4588.61\plugins\maven\lib\maven3\bin\m2.conf
-javaagent:C:\Users\<username>\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\183.4588.61\lib\idea_rt.jar=52683:C:\Users\<username>\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\183.4588.61\bin
-Dfile.encoding=UTF-8 -classpath C:\Users\<username>\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\183.4588.61\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher
-Didea.version=2018.3.1 clean package -U


In my Opinion the user-Settingsfile is missing in this call, if "override" is checked. This would be something like

--settings X:\dev\maven\settings.xml
0
Avatar
Permanently deleted user

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?

0

Currently there is no ETA on this. Please vote the https://youtrack.jetbrains.com/issue/IDEA-166074 issue.

0

Please sign in to leave a comment.