找不到kafka-clients-test.jar(org.apache)kafka:kafka-clients:0.10.2-Kafka-2.2.0)

siotufzp  于 2021-06-06  发布在  Kafka
关注(0)|答案(1)|浏览(786)

我想用gradlew发布一个版本。我在犯错误。
有人知道这个错误吗?我能够在本地构建所有内容,只有当我们发布时问题才会发生。

17:11:15,004 ERROR - FAILURE: Build failed with an exception.
17:11:15,004 ERROR -
17:11:15,004 ERROR - * What went wrong:
17:11:15,004 ERROR - Could not resolve all files for configuration ':search-tools-service-application:compileClasspath'.
17:11:15,004 ERROR - > Could not find kafka-clients-test.jar (org.apache.kafka:kafka-clients:0.10.2-kafka-2.2.0).
17:11:15,004 ERROR - Searched in the following locations:
17:11:15,004 ERROR - file:/local_repo/.m2/repository/org/apache/kafka/kafka-clients/0.10.2-kafka-2.2.0/kafka-clients-0.10.2-kafka-2.2.0-test.jar
17:11:15,004 ERROR -
17:11:15,004 ERROR - * Try:
17:11:15,004 INFO  -
17:11:15,004 INFO  - Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
17:11:15,004 INFO  - Use '--warning-mode all' to show the individual deprecation warnings.
17:11:15,004 INFO  - See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
17:11:15,004 INFO  - 5 actionable tasks: 4 executed, 1 up-to-date
17:11:15,004 ERROR - Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
17:11:15,004 ERROR -
17:11:15,004 ERROR - * Get more help at https://help.gradle.org
17:11:15,004 ERROR -
17:11:15,004 ERROR - BUILD FAILED in 13s
17:11:15,374 INFO  - Executing post-execute action...
17:11:15,375 ERROR - Step 'master>Publish Release - Git with Gradle>gradle publish using axion-release' is failed: Gradle build failed.
Errors occurred while build effective model from /local_repo/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.pom:
'build.plugins.plugin[io.spring.gradle.dependencymanagement.org.apache.maven.plugins:maven-antrun-plugin].dependencies.dependency.scope' for junit:junit:jar must be one of [compile, runtime, system] but is 'test'. in log4j:log4j:1.2.16

FAILURE: Build failed with an exception.

错误:无法解析配置“”的所有文件:搜索工具服务application:compileclasspath'.
找不到kafka-clients-test.jar(org.apache)。kafka:kafka-clients:0.10.2-kafka-2.2.0)。在以下位置搜索:file:/local\u repo/.m2/repository/org/apache/kafka/kafka clients/0.10.2-kafka-2.2.0/kafka-clients-0.10.2-kafka-2.2.0-test.jar
尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--debug选项运行以获取更多日志输出。运行--扫描以获得完整的见解。
获取更多帮助https://help.gradle.org
13秒内生成失败

17:11:15,527 INFO  - Executing post-execute action...
17:11:15,527 ERROR - Step 'master>Publish Release - Git with Gradle' is failed: Composite step 'Publish Release - Git with Gradle' failed due to unsatisfied success condition.
17:11:15,644 INFO  - Executing post-execute action...
17:11:15,644 ERROR - Step 'master' is failed: Composite step 'master' failed due to unsatisfied success condition.
kupeojn6

kupeojn61#

我也有同样的问题,这是因为 mavenLocal() 之前 mavenCentral() 在您的 build.gradle 文件。下载了其他内容 kafka-clients-2.x.x.jar 由于gradle可以在本地存储库中找到它,所以它甚至不会查找 kafka-clients-2.x.x-test.jar 在Maven中心。
尝试删除原始文件 org/apache/kafka/kafka-clients 目录下 ~/.m2/repository 再试一次。这为我解决了问题。

相关问题