• 连夜解决 maven 阿里云镜像无法下载 gexin-rp-* 的问题


    1、问题描述

    在使用“个推”开源组件时,发现 maven 一直无法下载依赖,报错如下:

    Cannot resolve com.gexin.platform:gexin-rp-sdk-base:4.0.0.38
    Cannot resolve com.gexin.platform:gexin-rp-sdk-http:4.1.2.3
    Cannot resolve com.gexin.platform:gexin-rp-sdk-template:4.0.0.31
    Cannot resolve com.gexin.platform:gexin-rp-fastjson:1.0.0.7
    

    2、解决办法

    分 2 个步骤:

    ①修改 maven 的配置文件 settings.xml 的镜像配置如下:

         
          alimaven
          aliyun maven
          https://maven.aliyun.com/repository/public/
          *,!getui-nexus
        

     其中 【,!getui-nexus】表示 getui-nexus 这个依赖不从 aliyun 进行下载(如果有其它不从阿里云仓库下载的也是使用逗号 , 分隔)。

    ②在项目的 pom.xml 配置里增加 getui-nexus 的仓库配置,如下:

    
    
        
            getui-nexus
            http://mvn.gt.getui.com/nexus/content/repositories/releases/
        
    

    3、重启 IDEA 即可生效

    号外:提供本人的“个推”的部分依赖代码段

    1. <properties>
    2. <gexin.rp.sdk.base.version>4.0.0.38gexin.rp.sdk.base.version>
    3. <gexin.rp.sdk.http.version>4.1.2.3gexin.rp.sdk.http.version>
    4. <gexin.rp.sdk.template.version>4.0.0.31gexin.rp.sdk.template.version>
    5. <gexin.rp.fastjson.version>1.0.0.7gexin.rp.fastjson.version>
    6. properties>
    7. <dependencies>
    8. <dependency>
    9. <groupId>com.gexin.platformgroupId>
    10. <artifactId>gexin-rp-sdk-baseartifactId>
    11. <version>${gexin.rp.sdk.base.version}version>
    12. dependency>
    13. <dependency>
    14. <groupId>com.gexin.platformgroupId>
    15. <artifactId>gexin-rp-sdk-httpartifactId>
    16. <version>${gexin.rp.sdk.http.version}version>
    17. dependency>
    18. <dependency>
    19. <groupId>com.gexin.platformgroupId>
    20. <artifactId>gexin-rp-sdk-templateartifactId>
    21. <version>${gexin.rp.sdk.template.version}version>
    22. dependency>
    23. <dependency>
    24. <groupId>com.gexin.platformgroupId>
    25. <artifactId>gexin-rp-fastjsonartifactId>
    26. <version>${gexin.rp.fastjson.version}version>
    27. dependency>
    28. dependencies>

  • 相关阅读:
    C++ “&”
    Python 用嵌套字典实现手机通讯录(详解版)
    Java连接websocket优雅断线、重连功能
    前端性能优化之控制请求并发数
    3Dmax中VR渲染太阳光渲染参数怎么设置?渲染100云渲染助力
    sessionStorage和localStorage
    [计算机通信网络]子网掩码
    docker安装jenkins最新版
    数据结构学习笔记——插入排序
    Android通知Notification使用全解析,看这篇就够了
  • 原文地址:https://blog.csdn.net/BiandanLoveyou/article/details/126722517