Instead of installing many versions of it in the operating system, we can just use the project-specific wrapper script.
mvn -N wrapper:wrapper -Dmaven=3.5.2
-> Create maven wrapper in your project.
build project
`mvnw.cmd clean install'
Require Java version for Maven
https://maven.apache.org/download.cgi
Make sure JDK is installed, and JAVA_HOME environment variable is configured
http://maven.apache.org/download.cgi
Environment Variables MAVEN_HOME = c:\opt\apache-maven-3.6.0
Add %MAVEN_HOME%\bin To PATH
Check Version mvn –version
File > Settings > Build, Execution, Deployment > Build Tools > Maven
Look: Maven home path.
We have 3 option
- Bundled Maven: it comes pre-installed in Intelij IDE
- Select Maven from your machine (point to the Maven path)
- Maven wrapper: this include in source code, so it does not depend on developer machine or IDE -> Prefer