IDEA配置maven教程
maven下载地址
http://maven.apache.org/download.cgi
解压后如
1 | G:\apache-maven-3.8.4-bin\apache-maven-3.8.4 |
配置环境变量
1 2 3 | MAVEN_HOME G:\apache-maven-3.8.4-bin\apache-maven-3.8.4 Path %MAVEN_HOME%\bin |
测试
IDEA配置maven
配置本地maven仓库
修改依赖下载地址
1 | <mirrors> <br><!-- mirror | Specifies a repository mirror site to use instead of a given repository. <br>The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. <br>IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.| <br><mirror> <br> <id>mirrorId</id><br> <mirrorOf>repositoryId</mirrorOf><br> <name>Human Readable Name for thisMirror.</name><br> <url>http: //my.repository.com/repo/path</url><br> </mirror> --><br> <mirror><br> <id>maven-default-http-blocker</id><br> <mirrorOf>external:http:*</mirrorOf><br> <name>Pseudo repository to mirror external repositories initially using HTTP.</name><br> <url>http://0.0.0.0/</url><br> <blocked>true</blocked><br> </mirror><br> <mirror><br> <id>alimaven</id><br> <name>aliyun maven</name><br> <url>http://maven.aliyun.com/nexus/content/groups/public/</url><br> <mirrorOf>central</mirrorOf><br> </mirror><br> <mirror><br> <id>ui</id><br> <mirrorOf>central</mirrorOf><br> <name>Human Readable Name for this Mirror.</name><br> <url>http://uk.maven.org/maven2/</url><br> </mirror><br> <mirror> <br> <id>jboss-public-repository-group</id><br> <mirrorOf>central</mirrorOf><br> <name>JBoss Public Repository Group</name><br> <url>http://repository.jboss.org/nexus/content/groups/public</url><br> </mirror><br> <mirror><br> <id>repo2</id><br> <mirrorOf>central</mirrorOf><br> <name>Human Readable Name for this Mirror.</name><br> <url>http://repo2.maven.org/maven2/</url><br></mirror><br><mirror><br> <id>OSChina</id><br> <name>OSChina Central</name><br> <url>http://maven.oschina.net/content/groups/public/</url><br> <mirrorOf>central</mirrorOf><br> </mirror><br> <mirror><br> <id>nexus-osc-thirdparty</id><br> <mirrorOf>thirdparty</mirrorOf><br> <name>Nexus osc thirdparty</name><br> <url>http://maven.oschina.net/content/repositories/thirdparty/</url><br> </mirror><br> </mirrors> |
修改IDEA的maven配置
配置完成后新建项目会出现maven
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步