dianping / cat

CAT 作为服务端项目基础组件,提供了 Java, C/C++, Node.js, Python, Go 等多语言客户端,已经在美团点评的基础架构中间件框架(MVC框架,RPC框架,数据库框架,缓存框架等,消息队列,配置系统等)深度集成,为美团点评各业务线提供系统丰富的性能指标、健康状况、实时告警等。
Apache License 2.0
18.69k stars 5.43k forks source link

Need repository for dependency com.dianping.cat:cat-client:jar:2.0.0 not found in central #2148

Open ryanajae opened 2 years ago

ryanajae commented 2 years ago

Hello, I'm trying to follow the steps stated here to resolve the dependency error noted in the issue (https://github.com/dianping/cat/issues/1183), when I encounter another dependency not found when running mvn -s settings.xml clean install -DskipTests.

Downloading: http://unidal.org/nexus/content/repositories/releases/com/dianping/cat/cat-client/2.0.0/cat-client-2.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Framework BOM ..................................... SUCCESS [  1.044 s]
[INFO] Framework ......................................... SUCCESS [  0.291 s]
[INFO] Foundation Service ................................ SUCCESS [  3.049 s]
[INFO] Eunit Test Framework .............................. SUCCESS [  7.156 s]
[INFO] Type Converter .................................... SUCCESS [  0.185 s]
[INFO] Java Fragment Script Engine ....................... SUCCESS [  0.121 s]
[INFO] DAL JDBC .......................................... FAILURE [  2.255 s]
[INFO] Test Framework .................................... SKIPPED
[INFO] Web Framework ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.274 s
[INFO] Finished at: 2021-11-18T21:42:14+00:00
[INFO] Final Memory: 42M/2317M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dal-jdbc: Could not resolve dependencies for project org.unidal.framework:dal-jdbc:jar:4.0.0: Could not find artifact com.dianping.cat:cat-client:jar:2.0.0 in central (https://repo1.maven.org/maven2) -> [Help 1]

Can you please provide an alternative repository for the dependency com.dianping.cat:cat-client:jar:2.0.0?

slankka commented 2 years ago

Hello, If you are compiling cat, I suggest you do not use cat-client-2.0.0,for some reasons, the jars of earlier versions are not published to public repositories.

However, for the cat main project, it's pom depends on some unidal jars: https://github.com/dianping/cat/blob/d8033c988b825f35fc06c20660f4aed927e43465/pom.xml#L46-L69 For those jars, you can get it by following steps:

  1. download jars

    git clone https://github.com/dianping/cat.git --depth 1 --branch mvn-repo

    note that org\unidal\maven\plugins\codegen-maven-plugin\2.0.9\ contains some 2.0.8(a little mistake), just delete them.

  2. import these jars to local maven repository

    • copy whole folder org to <LocalRepository> for example: %USERPROFILE%\.m2\repository

It will solve all "Could not find artifact org.unidal.framework" problems, then you will finally compile successfully.