-Re: Kafka 0.8 Maven and IntelliJ
Florin Trofin 2013-06-12, 21:04
Thanks Dragos, I've been using that plugin before, that will work on a
developer's machine when you try to build and debug the project but I also
need this to work with my automated build system.
That's why I need maven to work.
I've made a bit more progress:
> cd kafka
> ./sbt make-pom
> cd core
> cp targets/scala-2.8.0/kafka_2.8.0-0.8.0-SNAPSHOT.pom ./pom.xml
> mvn compile
Here you get a bunch of errors because of 3 missing dependencies caused by
messed up metadata for log4j in the repository.
"Change the version of log4j to 1.2.16.
The metadata for 1.2.15 is bad, as you have discovered, because the
dependencies are missing from the central repository. However, there is a
policy of not changing artifacts or metadata in the central maven
repository, because this can lead to builds being unrepeatable. That is, a
build might behave differently if an artifact or its metadata changed."
So edit the pom.xml and change the version for log4j from 1.2.15 to 1.2.16
(maybe somebody can fix it in the sbt configuration so we don't have to
keep patching this by hand?)
Now mvm compile downloads all the dependencies but it doesn't build
> mvn compile
[INFO] No sources to compile
'mvm package' gives a similar warning - that the generated jar file will
be empty. So it seems to me that the POM doesn't know anything about
source code that it needs to compile. Maybe this is a quick fix for the
engineer that created the sbt project file, I don't know.
BTW, after renaming the kafka_2.8.0-0.8.0-SNAPSHOT.pom to pom.xml, IDEA
can open the project and it shows the sources in project view, but when I
try to compile the project I get the same result as above (nothing
Any help on this will be really appreciated.
On 6/12/13 10:45 AM, "Dragos Manolescu" <[EMAIL PROTECTED]>
>For IntelliJ I've always used the gen-idea sbt plugin: