• 连夜解决 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>

  • 相关阅读:
    搭建基于Apache的Jena图数据平台
    macbook 上的 redis.conf 在哪里
    【1++的数据结构】之map与set(二)
    Spring中加密工具类DigestUtils和BCryptPasswordEncoder
    基本程序单元Activity
    Java方法的使用
    B站python爬虫课程笔记(Q16-)
    【Unity】万人同屏高级篇, BRG & Jobs实战应用, 海量物体同屏
    使用js控制文字大小自动适应div不换行,div中文字字号自动调整大小以适应固定宽度
    ECC算法,邮件系统安全防护的“得力助手”
  • 原文地址:https://blog.csdn.net/BiandanLoveyou/article/details/126722517