Eclipse+Maven创建webapp项目
安装maven:
1、maven下载地址:http://maven.apache.org/download.cgi 也可直接百度
2、下载之后,配置maven的环境变量
添加新的系统环境变量MAVEN_HOME, 并设置其值为你安装的目录
MAVEN_HOME= D:\Programe File\apache-maven-3.3.9
更新系统PATH 变量, 添加;%MAVEN_HOME%\bin;到尾部;
3、测试maven配置是否成功打开命令行窗口,输入mvn -v,如果有maven 版本信息输出则证明配置成功,
否则请查看自己配置路径等是否正确。注意:安装maven前请确保已安装JDK并成功配置其环境变量。
4、修改maven conf下的settings.xml,设置 localRepository为本地仓库地址,可自定义,也可使用默认的
<localRepository>E:/mvn-local</localRepository>
Eclipse整合maven
1、打开Eclipse,依次打开Windows-->Prefrences,展开Maven的配置界面,在Installations 选项中 ,add 添加刚下载的maven
接着配置User Settings
完成之后,即可创建maven项目