Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq_38390092/article/details/90208091
Maven installation:
JAVA project construction and management tools
Version 3.0.5 (LINUX)
1. Make sure you have installed JDK official website to download version 3.0.5
https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.0.5/binaries/
3. decompress or unzip tar by
tar -zxvf apache-maven-3.0.5-bin.tar.gz
4. Configure Environment Variables
1.sudo vin /etc/profile 在最下面添加环境变量
2.export MAVEN_HOME = /目录位置/apache-maven-3.0.5
3.export PATH = $PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
4.执行source /etc/profile 使得生效
5.执行mvn -version 验证
5. Common Commands
清楚命令 :mvn clean
编译命令:mvn compile
打包(war)命令: mvn package
部署命令:mvn deploy
模板生成项目:mvn archetype:generate
单元测试:mvn tset
Skip unit tests: mvn clean package -Dmaven.test.skip = true
MVN configuration profile is $ {home} /conf/settings.xml