侧边栏壁纸
博主头像
八月寻英 博主等级

大道至简,知易行难

  • 累计撰写 34 篇文章
  • 累计创建 13 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Maven加速配置

smy
smy
2024-12-20 / 0 评论 / 0 点赞 / 54 阅读 / 1738 字 / 正在检测是否收录...
图标
文章摘要
LIK.CC-GPT

|

1.打开Idea里面的设置,找到构建工具选则Maven

2.在.m2目录(Maven安装目录)下面新建settings.xml文件把下面的配置内容复制进去

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

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">

  <localRepository>D:/maven_repository/</localRepository>

  <interactiveMode>true</interactiveMode>

  <offline>false</offline>

  <pluginGroups>

  </pluginGroups>

  <proxies>

  </proxies>

  <servers>

  </servers>

  <mirrors>
    <mirror>
      <id>aliyunmaven_central</id>
      <mirrorOf>central</mirrorOf>
      <name>阿里云公共仓库</name>
      <url>https://maven.aliyun.com/repository/central</url>
    </mirror>
    <mirror>
      <id>aliyunmaven_public</id>
      <mirrorOf>public</mirrorOf>
      <name>阿里云公共仓库</name>
      <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
    <mirror>
      <id>aliyunmaven_apache-snapshots</id>
      <mirrorOf>apache-snapshots</mirrorOf>
      <name>阿里云公共仓库</name>
      <url>https://maven.aliyun.com/repository/apache-snapshots</url>
    </mirror>
  </mirrors>

  <profiles>
    <profile>
      <id>aliyun_spring</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repository>
        <id>spring</id>
        <url>https://maven.aliyun.com/repository/spring</url>
        <releases>
          <enabled>true</enabled>
        </releases>
        <snapshots>
          <enabled>true</enabled>
        </snapshots>
      </repository>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>aliyun_spring</activeProfile>
  </activeProfiles>
</settings>

3.重写文件路径为刚才新增的settings.xml应用即可

0

评论区

这篇文章对你有帮助吗?
  • 非常有用
    0
    非常有用
  • 有帮助
    0
    有帮助
  • 一般
    0
    一般
  • 无帮助
    0
    无帮助
  • 看不懂
    0
    看不懂
  • 有错误
    0
    有错误
评论
  • 按正序
  • 按倒序
  • 按热度