英文:
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,会显示如下内容:
那么为什么它后面没有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:
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
专注分享java语言的经验与见解,让所有开发者获益!


评论