1. Open Eclipse
2.window-->references-->maven0-->user Settings: Modify User settings,browse to re-select new Location D:\gongsi\ Apache-maven-3.1.0\conf\settings.xml.
When you integrate maven2 in Eclipse, Eclipse creates a directory under your system disk (c:/) by default.
C:/Documents and Settings/danlley/.m2/repository
and use it as a data Warehouse directory. If one day when you are unfortunate need to redo the system, and can not be maven2 warehouse directory in time to transfer the data, you have done to maven2 warehouse all maintenance will mean naught. In order to minimize your loss in maven2, improve the safety factor of your so-called labor outcomes, it is recommended that you migrate your data warehouse in the following ways:
1. Open Eclipse
2.window-->references-->java-->build Path-->classpath variables
3. Through the above two operations you will see a variables property named M2_repo
4. Double-click the attribute or click the Edit button
5. Modify Properties C:/Documents and Settings/danlley/.m2/repository to E:/maven-2.0.4/.m2/repository
OK, from now on you can rest assured!
In addition, if you want to put the post-installation maven2 Data Warehouse simply point to a backup folder, you can
E:/maven2/maven2/conf
Below, locate a settings.xml file, open the file, and locate the following node to modify it.
<localRepository>E:/maven-2.0.4/.m2/repository</localRepository>
Note: The settings here are best configured in the same way as in eclipse, so that you can consume unnecessary disk space and repeatedly download resources.
But I found that if you download update maven at the address
http://m2eclipse.codehaus.org/update-dev/
You can set up my local repo.
Modify settings.xml and default repository save addresses in eclipse