IDEA 中的MAVEN 配置

“File”—>“Others Settings”,然后在“Default Preferences”里的“Maven”中进行配置

配置在maven上运行项目
IDEA 中的MAVEN 配置
修改maven仓库 地址(此处我的Maven仓库由默认的用户家目录下的.m2文件改成了)
IDEA 中的MAVEN 配置
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->


<localRepository>d:/repository/repo</localRepository>

配置阿里云镜像

IDEA 中的MAVEN 配置
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>