37

I've just started using IntelliJ (I'm used to Eclipse) and I've come across something that really annoys me. Whether it's me or IntelliJ, I really want this fixed.

Every time I open a new project, the "Maven home directory" setting is reset and I therefore have to set this every time I open a project I haven't opened before.

Is there any way to set this setting permanently/globally?

jerry
  • 2,581
  • 1
  • 21
  • 32
Linora
  • 10,418
  • 9
  • 38
  • 49

5 Answers5

48

IntelliJ IDEA 2018.x or later:

Settings for new projects

Welcome screen

Older versions:

You can change it in the Template Project Settings so that all the new projects inherit this setting. You can access it from the File menu when the project is open or from the Welcome Screen: Configure | Template Project | Settings.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
43

In Intellij 2018.1:

File -> Other Settings -> Default Settings...

enter image description here

Changing default settings will apply only to new projects.
Current project won't be affected.

Andrzej Rehmann
  • 12,360
  • 7
  • 39
  • 38
  • It is still buggy in 15.0 Build #IU-143.381 You need to override "User settings file" and "Local repository" in order for it to work – laertis Feb 12 '16 at 10:29
  • I did the same thing with File -> Settings.. option. And it worked. – sSaroj Nov 08 '17 at 14:02
11

In IntelliJ 2020.2 it's now directly

File -> New Projects Settings -> Settings for New Projects...

enter image description here

Imal
  • 481
  • 1
  • 6
  • 14
6

Intellij 2018.2 its now under File > Other Settings > Preference for New Projects

mel3kings
  • 8,857
  • 3
  • 60
  • 68
0

I would place your settings which are valid for all projects into maven/conf/settings.xml and not into the users home directory. Then set the environment variable M2_HOME to the maven folder. IntelliJ should then be able to auto-detect the maven installation. It does not look like it reads the settings.xml from the maven setup but it does use it, you don't have to overwrite the settings.xml in the idea settings dialog. just leave the default in place. But I think you need to set the M2_HOME variable in your system.

wemu
  • 7,952
  • 4
  • 30
  • 59