Unzip the file and put into Program files. So the Maven path would be C:\Program Files\apache-maven-2.2.1
Setting the Maven Environment Varable
Right click My Computer
Go to advanced tab
Click “Environment Variables” button
In the System variables click new button. Set the path to Maven directory and give M2_HOME as variable name as follows.
Now from the System Variable set select “Path” variable and click edit.
Add the ;% M2_HOME%/bin; at the end of path value as follows.
Verify the Installation
Open command line and type mvn command.
Installing Maven into your PC - Ubuntu
Unzip maven archive in to what ever location and set the path using one of below option.
Using Command permanent:
sudo ln -s /your/maven/location/bin/mvn /usr/bin/mvn
Option Two Temporary:
Note that for Eclipse Update for Maven does not require Apache Maven to be installed to your PC.
First download eclipse 3.4.0 from
here Latest Eclipse Download
Then after the Eclipse installation update the Eclipse for m2Eclipse plug-in. Then you can work with maven inside Eclipse IDE.
- Run Eclipse
- Go to Help
- Software Updates
- Click Add Sites and in the opening window give the following URL.
- Click Ok
- Then Select Maven Integration for Eclipse Update Site from the site list and click install
After the successful update the eclipse will be asked for restart. Restart it. Now you can ensure the maven update by opening maven console.
- Go to Window icon from the menu bar
- Select Show view
- Select Console
Eclipse console will be opened. In the console click “Open Console menu”. There you can see maven console selection. Select it. Console will change to maven console.