Eclipse modifies the address of maven's local repository

After Eclipse installs the maven plugin, the default location of the repository library will generally be in the c drive. The modification method is as follows.


For example: my default location is: C:\Users\Administrator\.m2\repository. I want to change to E:\.m2\repository directory.

1、

Go to C:\Users\Administrator\.m2\ and create a settings.xml file in the .m2 folder. Its content is:

<settings>  
    <localRepository>E:\.m2\repository</localRepository>  
</settings>

 

Then copy the .m2 folder in the original C drive directly to the E drive. (to avoid re-downloading the existing library).

2、

Enter the user settings of eclipse



 Click OK.

3、

Looking at the maven dependencies, you can find that the settings have been completed. The location of the library has changed to where we want it



 

 

 Reference:  http://blog.csdn.net/u010061060/article/details/51477738

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326310203&siteId=291194637