One of the existing projects was managed using MAVEN, and the source code was put into subversion. Although Maven manages the project very conveniently, it is cumbersome to deploy. Build the project jar package locally, upload it to the server, and then restart the service. If you install MAVEN on the server, you can build the project jar package directly on the server, which is easier to deploy.
MAVEN is: http://maven.apache.org/download.cgi
It's easy to install MAVEN, just unzip the downloaded compressed file.
cd/usr/local/src/wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.1.1/binaries/ apache-maven-3.1.1-bin.tar.gztar zxf apache-maven-3.1. 1-bin. Tar . GZ MV apache-maven-3.1. 1 /usr/local/maven3
VI /etc/ profile Then you also need to configure the environment variables.
#在适当的位置添加export m2_home=/usr/local/maven3export PATH= $PATH: $JAVA _home/bin: $M 2_home/bin
After you save the exit, run the following command to make the configuration take effect, or restart the server.
Source/etc/profile
Verify version
Mvn-v
If the installation is correct, you can see the MAVEN version. If you are prompted with the following error, check that the PATH environment variable value in/etc/profile contains the paths to the Maven executable file and that the configuration is in effect.
-bash:mvn:command not found
More about MAVEN's usage can be found here: Maven Getting Started Guide
CentOS installation maven