How to configure Maven into Eclipse
Step 1: Basic System Requirements
- Check if java installed on your machine.
- From Command prompt, please enter “java -version” which will display the Java version installed in your local machine.
Step 2: Download Maven
We need to Download the stable version of Maven from Click here to download Maven latest version
- For Windows system make sure you download Maven (Version) (Binary zip)
- For Linux Machines, make sure you download Maven (Version) (Binary tar.gz)
Step 3: Extract the File, and place it into system (Example: D: \Automation\Tools)
Rename the file from Apache Maven (version) to simple Maven for just usability.
Example: C:\Program Files\Maven
Step 4: Configure Maven into Environment Variables.
- Once we have downloaded, all that we are to do before start using MAVEN is set a couple of environment variables.
- To do that, right click Computer >> Properties >> Advanced >> Environment Variables.
- And, we need to add Maven path into a second variable that we need to set up is the PATH variable.
- The reason we need to do this is that we can trigger maven executable command from anywhere in your command prompt and it will point to the MAVEN executable which is in the BIN folder.
- First you need to set the new variable as “MAVEN_HOME” and provide the path where the Maven is stored in our system.
- Example: D:\Automation\Toools\Maven” or as above mentioned C:\Program Files\Maven)
- Next we need to add the bin folder to the Path.
- Select the Path in System variables and Click on Edit.
- Add the path of the Maven Build Folder as %MAVEN_HOME%/bin or simply as (C:\Program Files\Maven\bin).
- Click on OK and Apply the Environment Variables.
Step 5: Check if Maven is installed/configured properly
- So, let’s test to see if MAVEN is properly installed/configured .
- Let’s use a simple MAVEN command is mvn –version.
- Open Command Prompt and enter the command as mvn -version
- It should display the version number as in the below screen shot.
- Then we are all set to use Maven.