After adding MAVEN2 plug-ins from eclipse, the path to MAVEN's default local library is ${user}/.m2/repository/, and generally Windows users ' operating systems are installed on the C drive, so the jar packages in this directory are more dangerous. I tried to find M2_repo this variable from the Myeclipse->preferences->java->build path->classpath variables, and found that its path pointed to "c:/ Documents and settings/lvxda/.m2/repository/", I want to modify its path to: d:/m2/repository, but this variable edit button is gray, not editable. No corresponding solution has been found on the Internet. To try it yourself:
1, manually create the local warehouse address is: d:/m2/repository
2, added from the environment variable of Windows: M2_repo=d:/m2/repository, add this variable to the path variable at the same time.
3, modify the D:/maven/conf/setting.xml file, add a line under the <localRepository> node:
Code:<localrepository>d:/m2/repository</localrepository>
Indicates that the address of the local warehouse is: D:/m2/repository.
4. From myeclipse->preferences->maven->installations add a maven that has been installed on the D drive, such as: D:/maven, and tick this new add-on. and click on the browse button below to open MAVEN's global profile, such as: D:/maven/conf/setting.xml.
5. Modify the user setting option from Myeclipse->preferences->maven->installations to: d:/m2/repository/ Settings.xml, and click Update Settings. and click on the Reindex button below to update the index.
6. Click the Apply button in the Configuration window to highlight the configuration window.
7, configuration changes, Myeclise will automatically update the index, when the completion of the restart MyEclipse, you will find the value of M2_repo variable becomes d:/m2/repository.
Since then, the jar packages that Maven downloads from the remote library will be placed under D:/m2/repository.
Reprint: http://blog.csdn.net/xuechongyang/article/details/8267440
Change the value of M2_repo in Eclipse-reproduced