maven下载安装

本文介绍了如何下载Maven,配置环境变量,包括用户变量和系统变量,并在Windows环境下验证配置是否成功。接着讲解了在IntelliJIDEA中配置Maven,指定Maven的安装目录,创建本地仓库,以及添加阿里云镜像作为加速源。
摘要由CSDN通过智能技术生成

1.下载

  1. 下载地址:浏览器搜索maven进入官网(https://maven.apache.org/)
    在这里插入图片描述
  2. Download(下载)>>>Binary zip archive apache-maven-3.9.1-bin.zip(版本选择)
    在这里插入图片描述

2.配置环境变量

  1. 新建变量

高级系统设置>>>环境变量>>>新建(W)。
用户变量对当前用户有效,系统变量对所有用户有效。
变量名maven,变量值maven根目录。
在这里插入图片描述

  1. 添加路径

Path>>>编辑>>>新增“%maven变量名%\bin”>>>确定确定确定。
在这里插入图片描述

  1. 查看配置

win+R>>>cmd>>>输入命令

mvn -version

若正常显示maven版本号则环境变量配置成功。
在这里插入图片描述

3.idea配置maven

File>>>settings>>> 搜索maven(Build>>>Build Tools>>>maven)

  1. 修改maven家目录,即安装根目录。

  2. 选择settings文件,在conf文件下。

  3. 新建一个本地仓,选择本地仓。
    在这里插入图片描述

  4. 修改settings文件本地仓地址,保存。
    在这里插入图片描述

  5. 添加阿里云镜像.

settings文件里找到mirrors 标签,加入该镜像,保存。

<mirror>
            <id>alimaven</id>
            <mirrorOf>central</mirrorOf>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  </mirror>

在这里插入图片描述

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值