Maven 安装

1、首先下载maven,到官网下载即可http://maven.apache.org/download.cgi

2、下载好压缩包,解压到本地某一个目录即可,如:D:\apache-maven-3.1.1

3、配置下环境变量:MAVEN_HOME:D:\apache-maven-3.1.1

path中加入%MAVEN_HOME%\bin

4、测试,打开cmd,输入mvn -version,即可看到maven的版本号,安装完成

5、更改maven的本地仓库位置:找到maven在本地安装的目录,打开conf文件夹,里面有个settings.xml文件,加上

<localRepository>D:\maven-project\repository</localRepository>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
<localRepository>D:\maven-project\repository</localRepository>
  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

转载于:https://www.cnblogs.com/wyang0126/p/5039911.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值