1.下载maven安装包,https://maven.apache.org/download.cgi
2.安装maven,具体百度
3.下载eclipse,http://www.eclipse.org/downloads/,20160615使用的是mars版本
4.解压运行eclipse,配置maven,如果eclipse里没有maven插件,需要另行安装
5.新建maven project项目,
6.看到新建的spring-framework项目,打开pom.xml文件,修改packaging属性为jar,粘贴spring官网的配置信息
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>spring</groupId> <artifactId>spring-framework</artifactId> <packaging>jar</packaging> <version>1</version> <name>spring-framework Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.2.6.RELEASE</version> </dependency> </dependencies> <build> <finalName>spring-framework</finalName> </build> </project>
<dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.2.6.RELEASE</version> </dependency> </dependencies>
保存pom.xml,然后就会看到maven在后台下载spring的jar等相关文件,或者刷新项目工程.
7.在这里找到下载的相关jar文件
去repository文件夹下找jar包吧!
well done!