[Tool] Maven enhanced version - the use of mvnd
download
Releases · apache/maven-mvnd (github.com)
Choose the corresponding version
The Windows version I use
1. Installation
Unzip directly.
Then configure the environment variable: add the bin directory to PATH
2. Test
Open the CMD terminal, enter mvnd -v
You can see the following information to indicate that the installation is successful:
3. Use
It is the same as Maven in use, and the parameters are also consistent.
Maven is used mvn clean package
; using Maven-mvnd only needs to be changed mvnd clean package
, and the other is the same.
4. Configuration modification
For minimal compatibility with the original Maven, you can use the original setting.xml
Open the file in the Maven-mvnd installation directory /conf/mvnd.properties
and modify:
maven.settings=E://apache-maven-3.5.4-bin//apache-maven-3.5.4//conf//settings.xml
(note yes //
)
5. Command difference
Order:
# maven 打包命令
mvn clean package -Dmaven.test.skip=true
# mvnd 打包命令
mvnd clean package -Dmaven.test.skip=true