为什么 “gradle dependencies” 不显示所有依赖项?

huangapple go评论119阅读模式
英文:

Why "gradle dependencies" doesn't show all dependencies?

问题

我目前在我的gradle.build中有implementation 'mysql:mysql-connector-java'

我在maven仓库中查找,上面写着mysql:mysql-connector-java有一个编译依赖com.google.protobuf:protobuf-java

但是如果我执行gradle dependencies,会显示如下内容:

为什么 “gradle dependencies” 不显示所有依赖项?

那么为什么它后面没有com.google.protobuf:protobuf-java呢?

英文:

I have implementation 'mysql:mysql-connector-java' currently in my gradle.build.

And I look up in maven repository,it says mysql:mysql-connector-java have a complie dependency of com.google.protobuf:protobuf-java.

But if i execute gradle dependencies,this was shown:

为什么 “gradle dependencies” 不显示所有依赖项?

So why there is no com.google.protobuf:protobuf-java after it??

答案1

得分: 1

com.google.protobuf:protobuf-java包在主要用于构建mysql:mysql-connector-java包的源代码,而gradle会从maven存储库中获取构建的jar文件。这就是为什么该包在库列表中缺失的原因。

链接:https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-installing-maven.html

请查看下面的链接:

链接:https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-installing-source.html

英文:

The com.google.protobuf:protobuf-java package is required for building the source of mysql:mysql-connector-java package mainly and gradle fetches build jar files from the maven repository. That's why that package is missing in the library list.

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-installing-maven.html

Check the below link :

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-installing-source.html

huangapple
  • 本文由 发表于 2020年5月30日 09:28:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/62096772.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定