【发布时间】:2019-06-26 13:05:50
【问题描述】:
我正在尝试使用 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.
-
出了什么问题: 无法解析配置 ':search-tools-service-application:compileClasspath' 的所有文件。
找不到 kafka-clients-test.jar (org.apache.kafka:kafka-clients:0.10.2-kafka-2.2.0)。 在以下位置搜索: 文件:/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
尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
通过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.
【问题讨论】:
-
你有没有尝试去 local_repo/.m2/repository/ 检查文件是否存在?
-
更多信息,此错误发生在快速构建机器上。在我的本地中,在 maven 中没有该 jar 文件,但仍然可以正常构建,我们正在使用 gradle,并且在我的 gradle 缓存中,下面的 jar 是那里 /Users/gajjarj/.gradle/caches/modules-2/files-2.1/org.apache.kafka/kafka-clients/0.10.2-kafka-2.2.0/b185c7d7529f2cebffc831161f9457aff0f15779/kafka-clients-0.10.2-kafka -2.2.0-test.jar
标签: spring-boot gradle apache-kafka release