maven下载安装及环境配置(详细)

本次安装maven版本是3.9.1,安装系统是win11

第一、下载 官方地址

进入官网后,windows系统选择第二个即可
在这里插入图片描述
下载后解压至D盘根目录(maven目录中不得有中文或者空格)
在这里插入图片描述

第二、配置maven本地仓库

在conf中找到setting.xml文件。打开setting.xml文件
添加<localRepository>E:\maven\repository</localRepository>,如下图

在这里插入图片描述

第三、配置阿里云仓库

默认远程仓库在国外,由于一些限制,国外仓库在速度上可能不太理想,所以配置国内阿里云的仓库。

  <mirrors>
  <!-- 阿里云仓库-->
    <mirror>
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>
    </mirror>


  </mirrors>

第四、环境变量配置

右击此电脑→属性→高级系统设置→环境变量
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
找到系统变量中的path,双击进入编辑页面,点击新建→浏览,找到maven目录(到bin这一层),然后一直点击确定即可
在这里插入图片描述

第五、测试是否配置成功

打开cmd命令窗口,输入mvn -version打印出maven和java相关信息即可证明安装成功

在这里插入图片描述
至此Maven的安装与配置就完成了,可以在IDEA创建Maven项目了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论
Apache Maven What is it? ----------- Maven is a software project management and comprehension tool. Based on the concept of a Project Object Model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information. Documentation ------------- The most up-to-date documentation can be found at http://maven.apache.org/. Release Notes ------------- The full list of changes can be found at http://maven.apache.org/release-notes.html. System Requirements ------------------- JDK: 1.7 or above (this is to execute Maven - it still allows you to build against 1.3 and prior JDK's). Memory: No minimum requirement. Disk: Approximately 10MB is required for the Maven installation itself. In addition to that, additional disk space will be used for your local Maven repository. The size of your local repository will vary depending on usage but expect at least 500MB. Operating System: Windows: Windows 2000 or above. Unix based systems (Linux, Solaris and Mac OS X) and others: No minimum requirement. Installing Maven ---------------- 1) Unpack the archive where you would like to store the binaries, eg: Unix-based operating systems (Linux, Solaris and Mac OS X) tar zxvf apache-maven-3.x.y.tar.gz Windows unzip apache-maven-3.x.y.zip 2) A directory called "apache-maven-3.x.y" will be created. 3) Add the bin directory to your PATH, eg: Unix-based operating systems (Linux, Solaris and Mac OS X) export PATH=/usr/local/apache-maven-3.x.y/bin:$PATH Windows set PATH="c:\program files\apache-maven-3.x.y\bin";%PATH% 4) Make sure JAVA_HOME is set to the location of your JDK 5) Run "mvn --version" to verify that it is correctly installed. For complete documentation, see http://maven.apache.org/download.html#Installation Licensing --------- Please see the file called LICENSE.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不想努力的程序员

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值