How to setup maven for Java project development in windows?

  1. Download Java from oracle repository

2. Set JAVA_HOME as environment variable

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_141

3. Download Maven from maven repository. Its important to verify whether the Java and Maven versions that you have chosen is compatible with each other.

4. Set M2_HOME as environment variable


5. Set MAVEN_HOME as environment variable


6. Update path variable with below entry


7. Open command prompt. Run below command to verify if environment variables are properly set

mvn version

8. if no error messages, then you are ready to use Maven

i hope this information is useful to you.

Kindly let me know if you have any queries.

Like what you read? Give Divine a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.