Maven常用仓库及配置多仓库

本文介绍了Maven常用的仓库,包括center、jcenter、spring plugins、sonatype和aliyun仓库,并提供了相应的配置信息。通过配置多个仓库,可以确保在搜索和下载jar包时覆盖更广泛的资源,提高效率。同时,分享了一个完整的settings.xml配置示例,帮助开发者更好地管理和使用Maven仓库。
摘要由CSDN通过智能技术生成

常用repo列表

首先介绍一个搜索jar包的常用网址:http://mvnrepository.com/

如果想知道哪些库比较流行,可以在 https://mvnrepository.com/repos/central 看到。截止2021年9月,最流行的仍然是central这个库。

center

repo配置:

        <repository>
            <id>central</id>
            <!-- This should be at top, it makes maven try the central repo
                first and then others and hence faster dep resolution -->
            <name>Maven Repository</name>
            <url>https://repo1.maven.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

jcenter

repo配置:

        <repository>
            <id>jcenter</id>
            <url>https://jcenter.bintray.com</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>

spring plugins

url:https://repo.spring.io/plugins-release/

sonartype

排名靠前。大名鼎鼎的nexus就是sonartype公司的产品。

url:https://oss.sonatype.org/content/repositories/releases/

spring的几个仓库

repo配置:

        <repository>
            <id>libs
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值