Import Kafka source code to Scala IDE and kafkascala
After one night of tossing, I finally went to Scala IDE (Eclipse and Sacla plug-in) to view the source code of the Apache Kafka project.
My environment is: win7 32-bit, Scala IDE: 4.0.0, Apache Kafka: 0.8.1.1 (added a gradlew. bat file in version 0.8.2)
After downloading Scala IDE, I started to find the source code of Apache Kafka. At the beginning has been using kafka latest engineering source code kafka-0.8.2-beta-src.tgz, but Scala IDE has been unable to open this project, because the kafka-0.8.2-beta-src.tgz after decompression, did not directly support IDE engineering files, need to use sbteclipse, gradle and other tools are built. Then the problem arises. I followed the steps on the official website to run Ivy and the gradlew eclipse command, and I always reported an error. It was uncomfortable to solve the problem one after another. Slowly I gave up the kafka-0.8.2-beta-src.tgz project package, it must be a problem, so building the project is too troublesome. Then I downloaded the kafka-0.8.1.1-src.tgz project, a look, the file is quite full, just missing a gradlew. bat file, I decisively copy a gradlew from kafka-0.8.2-beta-src.tgz. bat to the files decompressed by the kafka-0.8.1.1-src.tgz project. Then run gradlew eclipse in the kafka-0.8.1.1-src.tgz decompressed folder, and finally started to build the eclipse project normally. Using Scala to import the built projects is also successful.
I learned about Kafka, because when I was working on a Mina-based project, I used the message queue to process it as rabbitmq. I came to learn about Kafka when I encountered many problems. Apache has many great projects, so it is really nice to learn more. There is also such an open-source project, which is not very convenient for many of us and will be improved slowly.
Some problems encountered:
1. Run gradlew eclipse under the kafka-0.8.2-beta-src project error:
[Org. gradle. wrapper. GradleWrapperMain not found]
2. Download gradle, configure the environment variables, run gradle eclipse under the kafka-0.8.2-beta-src project error, and every attempt to solve an error, and will report a new error, endless:
[Cocould not find property 'ext 'on settings]