maven 环境变量设置和Java maven工具配置 on windows 7
2014-08-25 09:58
666 查看
How to install maven on windows 7
from: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 is not installed as windows service, rather it is configured using windows environment variables. These variables can be accessed from below location:
Control Panel > All Control Panel Items > System > Advanced system settings > Environment Variables
In this post, I will 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 be downloaded from 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 did 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 will be opened. Type mvn -version in command prompt and hit ENTER.
This should show the version information of maven installed. If there is any error shown, cross-check all above steps.
Happy Learning !!
Adding M2_REPO classpath variable in eclipse IDE
January 6, 2013 Lokesh+ 6 CommentsWe know that what is use maven and how to use 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 be added to eclipse ‘s class path variable on build path before using maven’s dependencies. Lets see how to do 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 has been added
Happy Learning !!
相关文章推荐
- Java环境变量设置(适用于Windows 2000、XP、2003)及Windows JSP运行环境配置
- Java相关工具在Windows环境变量中的配置
- Java及各工具(maven\tomcat\oracle)环境变量配置
- Windows下JAVA环境变量的设置祥解
- Windows下JAVA环境变量的设置祥解
- java和tomcat在windows上环境变量配置方法
- Windows下JAVA环境变量的设置祥解
- JAVA中配置环境变量设置方法大全
- [资料备分]Windows下JAVA环境变量的设置祥解
- Java环境变量设置(适用于Windows 2000、XP、2003)
- Windows下JAVA环境变量的设置祥解
- JAVA环境变量的设置祥解(以Windows为例)
- Windows下JAVA环境变量的设置祥解 (简易版)
- Windows下JAVA环境变量的设置详解
- Windows下JAVA环境变量的设置祥解
- Java环境变量设置(适用于Windows 2000、XP、2003)
- JAVA中配置环境变量的设置方法
- Windows下JAVA环境变量的设置
- Windows下JAVA和ANT环境变量设置
- Java环境变量设置(适用于Windows 2000、XP、2003)