Multiple projects correspond to multiple maven libraries, and specify different localRepository in different setting.xml files of maven corresponding to different projects
M
aven modifies the local repository location
step1: By default, it will be placed in the ~/.m2/repository directory ("~" represents the user's directory, such as C:\Documents and Settings\[your user name]\ under Windows),
step2: Modify the configuration file, the location is %MAVEN_HOME%/conf/setting.xml,
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
change into:
<localRepository>D:\Eclipse\jars\maven</localRepository>
or
<localRepository>${user.home}/.m6/repository</localRepository>
step3: Modify the storage location of MyEclipse's MAVEN:
Go to MyEclipse→window→Preferences→Maven4MyEclipse→Maven→Installations→User Sittings
Click Browse on the right to point to %MAVEN_HOME%\conf\settings.xml
----------------------------------------------------------------------
%MAVEN_HOME% represents the directory where your MAVEN is located
ref:http://hi.baidu.com/zyh010/item/862a75dc97f3bf52d73aaec3