Idea modified maven library path configuration does not take effect

Problem : Modifying the default path of the maven library always does not take effect.
Idea version: 2020.02

Question details: No matter how you configure in Idea, Maven will go to the default ${user.home}/.m2/setting.xml to find the setting file, and then find the repository according to the configuration in the setting file. The default location of Maven's local warehouse is on the C drive.

Solution :

  1. Use Notepad to open conf/settings.xml under the maven installation location; (ps: the maven you downloaded, not the c drive)
  2. The default location (approximately line 52): Default: ${user.home}/.m2/repository, usually C:/user/your computer name/.m2/repository.
  3. Enter outside the comment <localRepository>D:/Package/repository</localRepository>(the save path is chosen by yourself), save the settings.xml file and exit.
  4. For the file configuration just now to take effect, you need to change the default location of maven to the location just set in the setting interface of the tool idea. The idea modification is shown in the figure below.
    File->New Projects Settings->Settings for New Projects... Insert picture description here
    Build, Execution, Deployment->Build Tools->Maven
    Insert picture description here
    save the settings, restart IDEA and then create a new project will configure Maven according to the default settings

The above is the solution, please give me a thumbs up if it is solved, thank you ┗|`O′|┛ 嗷~~

This is the setting path of Idea version 2020.02. The setting path of other versions seems to be different.
I just stepped on a bunch of pits to configure the (;´༎ຶД༎ຶ`)
version 2020.02 of children’s shoes, don’t be like a blogger, silly it’s a waste of time in this setting in the picture below.
I’ve set this interface many times , You can’t change the default configuration of maven for new projects (the new version of 2020.02 can’t, I don’t know about other versions, but I searched a lot of blog posts and found that the old version is set in this interface), so children’s shoes should look at their own ideas Which version, don’t fall into the pit like me! !
Insert picture description here

Guess you like

Origin blog.csdn.net/ITvegetable/article/details/112424069