什么是Maven
- Maven是Apache的一款开源的项目管理工具
- Java01-JDK1.8下载安装教程(win11版)
Maven官网下载
- 点击跳转至Maven官网
- 点击DownLoad
- 点击 apache-maven-3.8.6-bin.zip(补充:tar.gz为linux版本;Source带源码)
- 将下载好的安装包进行解压,将文件夹放到自己想存储的位置即可
IDEA集成Maven
-
进入Maven文件夹,创建文件夹repository
-
进入conf文件夹,编辑settings文件(右键-打开方式-记事本;推荐使用Nodepad++),增加下图所示配置信息,路径为repository文件夹的绝对路径(注意这段配置添加的位置)
-
配置镜像仓库(阿里云镜像-注意这段配置添加的位置)
<mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror>
-
点击File-Settings
-
输入Maven
-
按图片指示操作
-
将下图所示位置,替换为settings.xml以及repository的绝对路径,点击ok即可
-
配置JDK(多JDK时需要设置),配置完成
<profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile>