一、依赖
1、jdk1.8已安装
二、操作
1、安装maven
yum install maven
2、查看maven版本
mvn -v
3、yum安装的maven路径
/usr/share/maven
4、maven配置阿里仓库
1)打开setting.xml
vi /usr/share/maven/conf/settings.xml
2)找到<mirrors>标签
3)增加阿里仓库配置
<mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror> <mirror> <id> maven-net-cn</id> <name> Maven China Mirror</name> <url>http://maven.net.cn/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>