Centos610安装MVN
1.下载mav安装
下载免安装版上传linux
cd /opt/maven
mkdir repository
cd apche-maven-3.3.9/conf
vi settings.xml 设置仓库地址
<?xml version="1.0" encoding="UTF-8"?>"http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> /opt/maven/repository optional true http proxyuser proxypass localhost 9000 local.net|some.host.com alimaven-1 aliyun maven-2 http://maven.aliyun.com/nexus/content/groups/public/ central alimaven-2 aliyun maven-2 http://maven.aliyun.com/nexus/content/repositories/central/ central jbossmaven jboss maven http://repository.jboss.com/maven2/ central jboss-public-repository-group central JBoss Public Repository Group http://repository.jboss.org/nexus/content/groups/public/
dev nexus-aliyun Nexus aliyun http://maven.aliyun.com/nexus/content/groups/public true true dev
保存退出
修改mvn执行权限
chmod 777 /opt/maven/apache-maven-3.3.9/bin/mvn
环境变了设置
vi /etc/profile
# set mvn enviroment MAVEN_HOME=/opt/maven/apache-maven-3.3.9 PATH=$PATH:$MAVEN_HOME/bin export MAVEN_HOME
立即生效
source /etc/profile
验证mvn
mvn -version
执行效果: