下载地址:https://archive.apache.org/dist/maven/maven-3/3.5.2/binaries/
将数据包提取出来
配置Maven环境
sudo gedit /etc/profile 将下面三条配置信息添加到profile文件的底部: export M2_HOME=/home/lll/apache-maven-3.5.2 export M2=$M2_HOME/bin export PATH=$M2:$PATH 编译一下: source /etc/profile 查看版本信息: mvn -v
修改maven源为阿里云,以及仓库默认存放路径。
gedit /home/lll/maven/apache-maven-3.5.2/conf/settings.xml 在打开的settings.xml文件中添加以下内容: 1、/home/lll/maven/repository (在home/lll中建立maven/repository文件夹) 2、nexus-aliyun * Nexus aliyun http://maven.aliyun.com/nexus/content/groups/public



