maven升级
小于 1 分钟
maven升级
apt-get autoremove maven3
wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz --no-check-certificate
tar zxvf apache-maven-3.6.3-bin.tar.gz
ubuntu@VM-49-125-ubuntu:~$ sudo mkdir /usr/local/maven
ubuntu@VM-49-125-ubuntu:~$ sudo mv apache-maven-3.6.3 /usr/local/maven/
ubuntu@VM-49-125-ubuntu:~$ echo "MAVEN_HOME=/usr/local/maven/apache-maven-3.6.3" >> ~/.bashrc
ubuntu@VM-49-125-ubuntu:~$ echo "PATH=\${PATH}:\${MAVEN_HOME}/bin" >> ~/.bashrc
ubuntu@VM-49-125-ubuntu:~$ echo "export PATH" >> ~/.bashrc
ubuntu@VM-49-125-ubuntu:~$ source ~/.bashrc
ubuntu@VM-49-125-ubuntu:~$ mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/maven/apache-maven-3.6.3
Java version: 1.8.0_172, vendor: Oracle Corporation, runtime: /home/ubuntu/jdk1.8.0_172/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-91-generic", arch: "amd64", family: "unix"