IDEA全局Maven

步骤一:
File > Other Settings > Settings for New Projects…
\"在这里插入图片描述\"

步骤二:
Build,Execution,Deployment > Build Tools > Maven
\"在这里插入图片描述\"

步骤三:
配置settings.
把settings. 文件直接往IDEA里拉,把多余的注释和节点删掉\"在这里插入图片描述\"
代码:

<?  version=\"1.0\" encoding=\"UTF-8\"?>

<settings  ns=\"http://maven.apache.org/SETTINGS/1.0.0\"
           ns:xsi=\"http://www.w3.org/2001/ Schema-instance\"
          xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd\">

<!--配置阿里云镜像服务器。在mirrors标签里添加以下一段即可。-->
  <mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>

</settings>

需要注意的是重启IDEA ,才能生效。

收藏 打印