(1) First modify your settings.xml file,(if there is no settings.xml file, you can download Maven's website to download the Maven plugin, in the apache-maven-3.5.0\conf\ directory)
Find the Localrepository node, modify the path you want to store ( note the path's '/', is left, otherwise there will be could not read settings.xml error )
(2) Set settings.xml file in Eclipse (Window--->maven--->user settings)
Click on the user settings to the right of browse, specify your settings.xml file, click Apply, you will find that the local repository path has become the path you specified.
(3) Restart your eclipse, Windows---> Java--->bulid path--->classpath variables, and discover that your M2_repo has become the path you specified.
(4) Download your project again and find that the path to the jar has changed
Modify Eclipse's repository path