maven2安装配置

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,打开修改

  <!-- 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所在的路径 -->

 

 

你可能感兴趣的:(apache,maven,C++,c,xml)