kafka 0.10.0.1 源码编译 之感

查看视频 和 网上的文档,下载了对应的版本,但是编译一直有问题。版本如下:

kakfa版本 :0.10.0.1
scalan:2.10.6
gradle:3.1

根据提示,不断的修正 版本, 和 修改 build.gradle 和 gradle.script 配置. Gradle 从 3.1 到 7.1,最后到 2.13.

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html.

FAILURE: Build failed with an exception.

* Where:
Script ‘/Users/fred-zhang/Documents/tool/kafka-0.10.0.1-src/gradle/buildscript.gradle‘ line: 21

* What went wrong:
A problem occurred evaluating script.
> No such property: allowInsecureProtocol for class: org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


发现 版本的不同,gradle 的实现会些不同。

最终 参照 build.gradle中的 gradleVersion =2.13, 又更新了 gradle 的版本

执行 成功了!!!

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html.
Building project ‘core‘ with Scala version 2.10.6
Build file ‘/Users/fred-zhang/Documents/tool/kafka-0.10.0.1-src/build.gradle‘: line 233
useAnt has been deprecated and is scheduled to be removed in Gradle 3.0. The Ant-Based Scala compiler is deprecated, please see https://docs.gradle.org/current/userguide/scala_plugin.html.
Download https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-plugin_2.10/1.1.1/scalac-scoverage-plugin_2.10-1.1.1.pom
Download https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-runtime_2.10/1.1.1/scalac-scoverage-runtime_2.10-1.1.1.pom
Download https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.pom
Download https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-plugin_2.10/1.1.1/scalac-scoverage-plugin_2.10-1.1.1.jar
Download https://repo1.maven.org/maven2/org/scoverage/scalac-scoverage-runtime_2.10/1.1.1/scalac-scoverage-runtime_2.10-1.1.1.jar
Download https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar
:downloadWrapper

BUILD SUCCESSFUL

中间断断续续花了 3-4个小时,一直在报错,查找,排错。

版本问题,还是 回归 源码的配置。

源码编译感觉算技术人基本的一项技能,但是 往往很多时候完成不了。

别人也许可以编译,但是 经过时间的变迁,到你也就就行不通了。

有帮助的解决一些问题的网站:

Allow insecure protocols, android gradle

Kafka 0.10.1版本源码 Idea编译

kafka 0.10.0.1 源码编译 之感

上一篇:JWT与cookie和token的区别


下一篇:Nginx静态文件不记录日志和过期时间