Convert the kafka project to a maven Project
The default source code provided by kafka is built through sbt. It is not very convenient to import to eclipse, so you can convert it into a maven project first. The pom. xml configuration is as follows:
4.0.0
com.sina.kafka
core
0.8.0-beta1
2008
2.8.0
scala-tools.org
Scala-Tools Maven2 Repository
http://scala-tools.org/repo-releases
scala-tools.org
Scala-Tools Maven2 Repository
http://scala-tools.org/repo-releases
org.scala-lang
scala-library
${scala.version}
junit
junit
4.4
test
org.specs
specs
1.2.5
test
com.101tec
zkclient
0.3
org.xerial.snappy
snappy-java
1.0.4.1
com.yammer.metrics
metrics-core
2.2.0
com.yammer.metrics
metrics-annotation
2.2.0
org.easymock
easymock
3.0
test
net.sf.jopt-simple
jopt-simple
4.9
src/main/scala
src/test/scala
org.scala-tools
maven-scala-plugin
compile
testCompile
${scala.version}
-target:jvm-1.5
org.apache.maven.plugins
maven-eclipse-plugin
true
ch.epfl.lamp.sdt.core.scalabuilder
ch.epfl.lamp.sdt.core.scalanature
org.eclipse.jdt.launching.JRE_CONTAINER
ch.epfl.lamp.sdt.launching.SCALA_CONTAINER
org.scala-tools
maven-scala-plugin
${scala.version}
Mainly relies on the maven-scala-plugin plug-in to build the project. The build command is: clean scala: compile package-DskipTests