Tuesday, February 10, 2015

Build Apache Kafka on Eclipse and Run Unit Tests

Earlier I tried to build Kafka by following the Developer Setup wiki link. But it was not successful due to several build error.

The same Developer Setup wiki has a link to Eclipse-Scala-Gradle-Git Developement Environment Setup page, by following the instruction on this page I was able to build and run Scala unit test without any problem.


The Following steps needs to be followed: 

* I downloaded the latest "kafka-trunk.zip" from GitHub and extracted it.
* Edit /kafka/gradle.properties
   Change to scalaVersion=2.11 from scalaVersion=2.10.4


Go to Eclipses > Help > Install New Software and install following plug-ins.

http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site 

http://dist.springsource.com/release/TOOLS/update/e4.4/
   (Above link details also available in Spring Tool Suite™ Downloads)

Import the Kafka Project

1 File > Import > Select Gradle Project.

2. In the next dialog, browse the Kafka project folder and Click "Build Model" button then it will start downloading necessary files and build the project. Once the build is completed, it will show all the Kafka projects.

3. Select All the projects and press Finish.


My Developer Environment Details:
  •  Ubuntu 14.04 LTS
  •  Java version "1.7.0_71"
  • eclipse-jee-luna-SR1a-linux-gtk-x86_64

Build Related Issues:

No comments:

Post a Comment