Maven : How to configure Maven into your Windows Machine

Maven is a powerful tool that is used for projects build and dependency management. 
Let see how you can configure Maven into you Windows machine.

Step1 : Download the Maven binary from you offical site. 



Step2 : Extract the binary and save it in some location.
        Let say c:\users\qahumor\maven

Step3 : Now we have to set Environment Variable for Maven.
        Right-click on My Computer ->Properties -> Advanced System Settings.
        Under Advanced Tab -> Click on "Environment Variables".


Step4 : Then click on New in System Variables.

Step5: Provide Variable name = M2_Home and Variable value = path where you saved &
       extract the maven binary ,in this case c:\users\qahumor\maven
Step6 : Select Path variable in System Variables and click on Edit 
        (be careful while changing anything).

Step7 : Go to the end and enter value like - ;%M2_Home%\bin
        (make sure to put semi-colon incase if its not present) and hit OK.

Step8 : To check whether Maven is configured properly.
        Open command prompt and type these commands

       -> mvn -version  [To see the version of maven into your pc]
				&
       -> mvn clean  [This is command to clean the project , you will see Build Failure ,
                      this is expected as you don't have POM.xml file as of now]
		
Thank you!!

No comments:

Post a Comment

Android : How to connect your Android device over Wifi using ADB command for App debugging

How to connect your Android device over Wi-Fi using ADB command Sometimes it requires to connect your Android dev...