Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA - Maven home directory setting resets for new projects

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?

like image 351
Linora Avatar asked Dec 06 '12 09:12

Linora


People also ask

How do I change the Maven home directory in IntelliJ?

From the main menu select File | Settings/Preferences | Build, Execution, Deployment |Build Tools | Maven. On the Maven settings page, in the Maven home directory field, specify the location of the Maven custom version installation.

What is Maven home directory?

The maven home directory tells you where maven is installed.

Is not a valid Maven home directory?

This error message means that the folder named "maven" that you've chosen does not contain maven installation. The default Maven Home Directory was the m2 folder. Normally, by default you'll see either the embeded maven or the value of M2_HOME environment variable.


2 Answers

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.

like image 55
CrazyCoder Avatar answered Oct 13 '22 09:10

CrazyCoder


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.

like image 31
Andrzej Rehmann Avatar answered Oct 13 '22 08:10

Andrzej Rehmann