MAVEN environment variable settings and Java MAVEN Tools configuration on Windows 7

Source: Internet
Author: User
Tags vcard

How to install MAVEN on Windows 7from:http://howtodoinjava.com/2013/01/02/how-to-install-maven-on-windows-7/
and:http://howtodoinjava.com/2013/01/06/adding-m2_repo-classpath-variable-in-eclipse-ide/

Maven is a build and dependency management tool for Java based application development. Just Like other Java based development tools, it's not installed as Windows service, rather it's configured using window s environment variables. These variables can is accessed from below location:

Control Panel > All Control Panel Items > System > Advanced System Settings > Environment Variables

In this post, I'll summarize the steps needed to install MAVEN on Windows 7 operating system.

Step 1) Install Java if not already done

To install Java, download JDK installer and add/update the java_home variable.

Step 2) Download Maven and extract it to desired location

Maven can is downloaded from the this location. I have extracted it in location:d:latest setupapache-maven-3.0.4. You can choose your own.

Now, set the maven_home variable just as you do for java_home variable.

Step 3) Update PATH variable

To-run maven from command prompt, this is necessary. Update the PATH variable with Maven ' s installation bin directory.

Step 4) Test the installation

Maven installation is complete. Now lets test it from Windows command prompt. Go to Start menu and type cmd in application location search box. Press ENTER. A new command prompt would be opened. Type mvn-version in command prompt and hit ENTER.

This should show the version information of MAVEN installed. If there is an any error shown, Cross-check all above steps.

Happy Learning!!

Adding m2_repo classpath variable in eclipse IDEJanuary 6, lokesh+ 6 Comments

We know that "use maven" and "how" for use of it from command prompt. Maven dependencies can be read from Eclipse IDE also which Maven exposes through m2_repo classpath variable which Points to Maven ' s local repository. This class variable must is added to eclipse's class path variable on build path before using Maven ' s dependencies. Lets See how to does this:

Step 1) Go to menu Windows > Preferences

Step 2) Navigate to Java > Build path > Classpath Variables

Step 3) Define new classpath variable M2_repo and point it to local maven repository

Step 4) Verify that variable have been added

Happy Learning!!

MAVEN environment variable settings and Java MAVEN Tools configuration on Windows 7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.