下载地址为:http://maven.apache.org/download.cgi,解压后存放在指定目录。在系统的环境变量中设置MAVEN_HOME,并在path中添加maven的bin路径。html
一、在线安装,经过Help中的eclipse Maketplace进行安装。java
二、离线安装,eclipse在线安装常常因为网速过慢没法安装,此时只能经过下载离线包进行安装。离线包直接百度下载,下载后解压,将features中内容拷贝到eclipse\features中,plugins文件夹中内容拷贝到eclipse\plugins目录中。
spring
在maven的安装文件中有一个conf/settting.xml文件。设置本地中央仓库存储路径,apache
<localRepository>F:\repository\maven</localRepository>
有时候网络较差,maven默认的中央仓库没法访问,须要设置镜像配置网络
<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>nexus-osc</id> <mirrorOf>*</mirrorOf> <name>Nexus osc</name> <url>http://maven.oschina.net/content/groups/public/</url> </mirror> </mirrors>
在eclipse的菜单中选择maven project后,修改pom.xml,添加eclipse
<packaging>jar</packaging> <url>http://mvnrepository.com/</url>
http://jingyan.baidu.com/article/db55b609a994114ba20a2f56.html
http://blog.csdn.net/chuyuqing/article/details/28879477
maven
http://repo.spring.io/libs-release-local/org/springframework/spring/4.1.7.RELEASE/
this