一.前言
利用mvn在CentOs下打包Java 项目.
二.步骤
step1:
$ wget http://mirrors.sonic.net/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
$ tar xzf apache-maven-3.3.3-bin.tar.gz -C /usr/local/
$ cd /usr/local
$ ln -s apache-maven-3.3.3/ maven
step2:
$ vim /etc/profile.d/maven.sh
添加下面语句.
export MAVEN_HOME=/usr/local/maven
export PATH=${MAVEN_HOME}/bin:${PATH}
step3:
运行下面命令,使其立即生效.
source /etc/profile.d/maven.sh