首页 > 其他分享 >maven 国内源配置

maven 国内源配置

时间:2024-05-12 22:45:19浏览次数:14  
标签:国内 central aliyun repository 配置 maven https com

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


<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">

    <pluginGroups>
        <!-- pluginGroup
         | Specifies a further group identifier to use for plugin lookup.
        <pluginGroup>com.your.plugins</pluginGroup>
        -->
    </pluginGroups>


    <proxies>

    </proxies>

    <servers>

    </servers>
    <profiles>
        <profile>
            <id>default</id>
            <repositories>
                <repository>
                    <id>central</id>
                    <name>central</name>
                    <url>https://maven.aliyun.com/repository/central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>spring</id>
                    <name>spring</name>
                    <url>https://maven.aliyun.com/repository/spring</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>repo1</id>
                    <name>repo1</name>
                    <url>https://repo1.maven.org/maven2/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>repo</id>
                    <name>repo</name>
                    <url>https://repo.maven.apache.org/maven2/</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>aliyun-plugin</id>
                    <url>https://maven.aliyun.com/repository/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>central</id>
                    <name>central</name>
                    <url>https://maven.aliyun.com/repository/central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>spring-plugin</id>
                    <name>spring-plugin</name>
                    <url>https://maven.aliyun.com/repository/spring-plugin</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>gradle-plugin</id>
                    <name>gradle-plugin</name>
                    <url>https://maven.aliyun.com/repository/gradle-plugin</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>default</activeProfile>
    </activeProfiles>
    <mirrors>
        <!--  <mirror>
              <id>aliyun</id>
              <url>https://maven.aliyun.com/repository/central</url>
              <mirrorOf>central</mirrorOf>
          </mirror>-->
        <!--   <mirror>
               <id>aliyun</id>
               &lt;!&ndash;            <mirrorOf>central</mirrorOf>&ndash;&gt;
               <mirrorOf>*</mirrorOf>
               <name>aa</name>
               <url>http://maven.aliyun.com/repository/central</url>
           </mirror>-->

    </mirrors>

</settings>

参考

https://help.aliyun.com/document_detail/102512.html

标签:国内,central,aliyun,repository,配置,maven,https,com
From: https://www.cnblogs.com/ronaldHU/p/18188323

相关文章

  • CodePen 的国内替代「笔.COOL」,一个功能完备、使用便捷的在线HTML代码编辑和作品分享
    笔.COOL,是一个在线HTML代码编辑和作品分享平台。笔.COOL提供了一个在线的HTML、CSS和JavaScript代码编辑器。无需任何安装,你只需打开网站,就可以开始编写前端代码。编辑器支持代码高亮、自动补全等功能,提高编码效率。笔.COOL还提供了实时预览功能,预览界面会随着你的代码更......
  • 抽丝剥茧:详述一次DevServer Proxy配置无效问题的细致排查过程
    事情的起因是这样的,在一个已上线的项目中,其中一个包含登录和获取菜单的接口因响应时间较长,后端让我尝试未经服务转发的另一域名下的新接口,旧接口允许跨域请求,但新接口不允许本地访问(只允许发布测试/生产的域名访问)。问题那么问题来了,本地环境该如何成功访问到新的接口并验证业务......
  • varnish源码编译以及简单配置
    varnish安装系统centos7ip192.168.40.131禁止透明大页echonever>/sys/kernel/mm/transparent_hugepage/enabled减少最大堆栈大小ulimit-s256安装nginxyumlist|grep^nginx&&yum-yinstallnginx*mkdir/usr/share/nginx/html/helloecho“hellowo......
  • maven的配置文件的心得(profile和mirrorof)
    https://www.cnblogs.com/li1111xin/p/4777965.html1、maven安装后有两个地方有settings.xml,(1)一个是maven安装路径下:conf/settings.xml,(2)一个是用户的本地仓库下:.m2/settings.xml,这个路径是默认的用户的maven的本地仓库的路径(3)如果指定了自定义的本地仓库的路径,那么把setting......
  • 在Linux中,如何配置Apache或Nginx Web服务器?
    配置Apache或NginxWeb服务器涉及到多个方面,包括安装、基本设置、虚拟主机配置、性能优化等。以下是配置这两种流行Web服务器的一般步骤:1.ApacheWeb服务器配置安装Apache:对于基于Debian的系统(如Ubuntu):sudoapt-getupdatesudoapt-getinstallapache2对于基于Red......
  • 在Linux中,如何配置邮件服务器?
    配置邮件服务器是一个复杂的过程,涉及到多个组件的安装和配置。以下是在Linux中配置邮件服务器的一般步骤,这里以使用Postfix作为MTA(邮件传输代理),Dovecot作为IMAP服务器,以及使用MySQL作为数据库的示例:1.安装必要的软件安装Postfix、Dovecot和MySQL(或其他数据库服务器)。对于基于D......
  • 在Linux中,如何配置Samba或NFS文件共享?
    在Linux中配置Samba或NFS文件共享允许用户通过网络访问和交换文件。以下是配置这两种服务的基本步骤:1.配置Samba文件共享安装Samba:对于基于Debian的系统(如Ubuntu):sudoapt-getupdatesudoapt-getinstallsamba对于基于RedHat的系统(如CentOS):sudoyuminstallsamb......
  • 使用TypeScript编写一个函数getPackageSize,该函数接收一个配置对象packageOpt作为参数
    使用TypeScript编写一个函数getPackageSize,该函数接收一个配置对象packageOpt作为参数,用于获取指定文件夹中所有文件的总大小,并根据配置决定是否返回已转换单位的大小值或直接通过回调函数返回字节大小。下面是一个基于Node.js环境的实现示例,因为直接在浏览器环境中操作文件系统......
  • Springboot自动配置原理
    在SpringBoot项目中的引导类上有一个注解@SpringBootApplication,这个注解是对三个注解进行了封装,分别是:@SpringBootConfiguration@EnableAutoConfiguration@ComponentScan其中@EnableAutoConfiguration是实现自动化配置的核心注解。该注解通过@Import注解导入对应的配......
  • USB 设备相关的注册表项通常存储在 Windows 操作系统的注册表数据库中。这些注册表项
    USB设备相关的注册表项通常存储在Windows操作系统的注册表数据库中。这些注册表项包含有关连接到计算机上的USB设备的配置信息。以下是一些常见的USB设备相关的注册表项:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB:这个键包含有关已连接到计算机的USB......