maven配置本地仓库和远程仓库
配置本地仓库
-
修改maven安装目录下conf/settings.xml,也可以在idea配置中覆盖
<localRepository>E:mavenMavenRepository</localRepository>
配置远程仓库
-
添加如下远程仓库
<!--阿里云公共仓库https://maven.aliyun.com--> <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云公共仓库</name> <url>https://maven.aliyun.com/repository/public</url> </mirror> <!-- 阿里云仓库 --> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror> <!-- 中央仓库1 --> <mirror> <id>repo1</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo1.maven.org/maven2/</url> </mirror> <!-- 中央仓库2 --> <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror>
idea配置
-
File - Settings - Build, Exception, Deployment - Build Tools - Maven:配置maven安装目录、settings.xml文件
上一篇:
IDEA上Java项目控制台中文乱码