Maven - environment variable

export M2_HOME=$HOME/workspace/apps/maven/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin

验证 maven 安装是否成功

g@g:~/workspace/xyzla.com/docker/redis$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/g/workspace/apps/maven/apache-maven-3.6.3
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: /home/g/workspace/apps/jdk1.8.0_241/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-38-generic", arch: "amd64", family: "unix"