You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Eclipse Setup

  1. Checkout kafka source
    1. svn co http://svn.apache.org/repos/asf/incubator/kafka/trunk kafka
  2. Update the libraries:
    1. ./sbt update
  3. Install the eclipse/scala plugin as described here.
  4. Create a new scala project File->New->Scala Project
  5. Set the location to the directory to which you checked out the code and choose a name for the project.
    1. Select the source directories you want, at least:
      1. core/src/main/scala
      2. core/src/test/scala/unit
  6. Add all the libraries in the Libraries tab: core/lib and core/lib_managed
    1. I had to also add the 2.9.1 scala library by choosing Add External Jar and choosing that library

You should be able to run unit tests or the kafka server or other command line apps through eclipse for debugging. To do this right-click the class you want to run and select

    1. Run as...<Unit Test|Scala Application>
    2. By default log4j will not be configured correctly. To fix this go to your run target and under Classpath choose Advanced... and then Add Folders, and the folder config/

Intellij Setup

  1. Checkout kafka source
    1. svn co http://svn.apache.org/repos/asf/incubator/kafka/trunk kafka
  2. Update the libraries:
    1. ./sbt update
  3. Create IDEA project files:
    1. ./sbt
    2. idea
  4. Install the IntelliJ IDEA Scala Plugin Preferences -> Plugins -> Browse Repositories -> Search for Scala
  5. Open Itellij, Open new project, point to your kafka source location.
  • No labels