资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

maven代理仓库的使用方法

这篇文章主要讲解了“maven代理仓库的使用方法”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“maven代理仓库的使用方法”吧!

站在用户的角度思考问题,与客户深入沟通,找到克东网站设计与克东网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站设计、成都做网站、企业官网、英文网站、手机端网站、网站推广、域名申请、网页空间、企业邮箱。业务覆盖克东地区。

代理的仓库列表

仓库名称代理源地址使用地址
centralhttps://repo1.maven.org/maven2/https://maven.aliyun.com/repository/central 或 https://maven.aliyun.com/nexus/content/repositories/central
jcenterhttp://jcenter.bintray.com/https://maven.aliyun.com/repository/jcenter 或 https://maven.aliyun.com/nexus/content/repositories/jcenter
publiccentral仓和jcenter仓的聚合仓https://maven.aliyun.com/repository/public 或https://maven.aliyun.com/nexus/content/groups/public
googlehttps://maven.google.com/https://maven.aliyun.com/repository/google 或 https://maven.aliyun.com/nexus/content/repositories/google
gradle-pluginhttps://plugins.gradle.org/m2/https://maven.aliyun.com/repository/gradle-plugin 或 https://maven.aliyun.com/nexus/content/repositories/gradle-plugin
springhttp://repo.spring.io/libs-milestone/https://maven.aliyun.com/repository/spring 或 https://maven.aliyun.com/nexus/content/repositories/spring
spring-pluginhttp://repo.spring.io/plugins-release/https://maven.aliyun.com/repository/spring-plugin 或 https://maven.aliyun.com/nexus/content/repositories/spring-plugin
grails-corehttps://repo.grails.org/grails/corehttps://maven.aliyun.com/repository/grails-core 或 https://maven.aliyun.com/nexus/content/repositories/grails-core
apache snapshotshttps://repository.apache.org/snapshots/https://maven.aliyun.com/repository/apache-snapshots 或 https://maven.aliyun.com/nexus/content/repositories/apache-snapshots

配置指南

maven配置指南

打开maven的配置文件(windows机器一般在maven安装目录的conf/settings.xml),在标签中添加mirror子节点:


    aliyunmaven
    *
    阿里云公共仓库
    https://maven.aliyun.com/repository/public

如果想使用其它代理仓库,可在节点中加入对应的仓库使用地址。以使用spring代理仓为例:


    spring
    https://maven.aliyun.com/repository/spring
    
        true
    
    
        true
    

gradle配置指南

在build.gradle文件中加入以下代码:

allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/public/' }
        mavenLocal()
        mavenCentral()
    }
}

如果想使用maven.aliyun.com提供的其它代理仓,以使用spring仓为例,代码如下:

allProjects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/public/' }
        maven { url 'https://maven.aliyun.com/repository/spring/'}
        mavenLocal()
        mavenCentral()
    }
}

感谢各位的阅读,以上就是“maven代理仓库的使用方法”的内容了,经过本文的学习后,相信大家对maven代理仓库的使用方法这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!


名称栏目:maven代理仓库的使用方法
分享网址:http://cdkjz.cn/article/pgjjcs.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220