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

 

posted @   疯子FK  阅读(4437)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示