`

maven2安装配置

阅读更多

【转自:http://axl-224.iteye.com/blog/712595

maven2安装步骤:
(1)maven官方下载地址:http://maven.apache.org/download.html,下载最新版本的maven软件,当前最新版本为apache-maven-2.2.1,解压到指定目录instealPath;
(2)设置系统环境变量:
       M2_HOME=%instealPath%
       PATH=%M2_HOME%\bin
(3)在console里输入mvn -version验证安装成功;
(4)配置repository的路径(本地数据仓库目录,即存放从远程下载的JAR包,默认路径是C:\Documents and Settings\Administrator\.m2\repository),在%instealPath%\conf目录下找到settings.xml,打开修改

Xml代码 复制代码
  1. <SPAN style="FONT-SIZE: small">  <!-- localRepository   
  2.    | The path to the local repository maven will use to store artifacts.   
  3.    |   
  4.    | Default: ~/.m2/repository   
  5.   <localRepository>/path/to/local/repo</localRepository>  
  6.   -->  
  7.   <localRepository>D:\ST\dev-tools\apache-maven-2.2.1\repository</localRepository>  
  8.   <!-- D:\ST\dev-tools\apache-maven-2.2.1\repository是本地repository所在的路径 --></SPAN>  
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  <localRepository>D:\ST\dev-tools\apache-maven-2.2.1\repository</localRepository>
  <!-- D:\ST\dev-tools\apache-maven-2.2.1\repository是本地repository所在的路径 -->

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics