IDEA配置maven教程
maven下载地址
http://maven.apache.org/download.cgi
解压后如
G:\apache-maven-3.8.4-bin\apache-maven-3.8.4
配置环境变量
MAVEN_HOME G:\apache-maven-3.8.4-bin\apache-maven-3.8.4 Path %MAVEN_HOME%\bin
测试
IDEA配置maven
配置本地maven仓库
修改依赖下载地址
<mirrors>
<!-- mirror | Specifies a repository mirror site to use instead of a given repository.
The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror.
IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for thisMirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror> -->
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>ui</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
<mirror>
<id>OSChina</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus-osc-thirdparty</id>
<mirrorOf>thirdparty</mirrorOf>
<name>Nexus osc thirdparty</name>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</mirror>
</mirrors>
修改IDEA的maven配置
配置完成后新建项目会出现maven