当前位置:   article > 正文

Could not find artifact com.gexin.platform:gexin-rp-sdk-http:pom:4.1.0.1

Could not find artifact com.gexin.platform:gexin-rp-sdk-http:pom:4.1.0.1

Could not find artifact com.gexin.platform:gexin-rp-sdk-http:pom:4.1.0.1

新接手了一个项目,导入到idea后,maven标签中页点击Reload All Maven Projects,报Could not find artifact com.gexin.platform:gexin-rp-sdk-http:pom:4.1.0.1错误,根据个推集成指南,pom中添加依赖,再添加repository,就可以解决,具体如下
将下边的依赖放到maven项目的 pom.xml 中:

<dependency>
    <groupId>com.gexin.platform</groupId>
    <artifactId>gexin-rp-sdk-http</artifactId>
    <version>4.1.2.3</version>
</dependency>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

然后再增加一个repository到 pom.xml 中:

 <repositories>
    <repository>
        <id>getui-nexus</id>
        <url>http://mvn.gt.getui.com/nexus/content/repositories/releases/</url>
    </repository>
 </repositories>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

以上需要修改源代码,想到设置私服应该也能解决这个问题;nexus管理端---->设置---->repositories—>create repository,填上被代理地址http://mvn.gt.getui.com/nexus/content/repositories/releases/,在maven-public仓库的group中勾选新创建的仓库,再次刷新即可。

maven-central、maven-release、maven-snapshots、maven-public

顺便说一下maven的几个常见仓库,

  • maven-central
    • proxy类型,它代理的https://repo1.maven.org/maven2/
  • maven-release
    • hosted类型,它是发布的自有release jar包
  • maven-snapshots
    • hosted类型,它是发布的自有snapshot jar包
  • maven-public
    • group类型,组合仓库,也就是其他几个仓库的组合,可指定它是哪几个仓库的组合,通常settings.xml中访问地址是http://ip:port/repository/maven-public,因为它的范围最广。
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/231406
推荐阅读
相关标签
  

闽ICP备14008679号