You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Stevo Slavić <ss...@gmail.com> on 2014/04/09 15:13:05 UTC

Building Kafka 0.8.1 branch with specific Scala version

Hello Kafka community,

I'm trying to import Kafka, 0.8.1 branch, in eclipse IDE.
Gradle eclipse plugin is already applied in Kafka build script.

If I just run "gradle eclipse", default scala 2.8.0 will be used to
generate eclipse project files, so classpath will exclude
kafka/utils/Annotations_2.9+.scala and include
kafka/utils/Annotations_2.8.scala instead. With eclipse using scala 2.10,
such Kafka eclipse project doesn't compile. Manual adjusting of classpath
is possible but dirty.

So, I want to use scala 2.10.x for Kafka build. Instructions in Kafka's
readme.md mentions scalaVersion property should be used. Has anyone used
it? I doubt, since it doesn't work.

If I run "gradle -PscalaVersion=2.10.1 eclipse", it seems only "2" will be
recognized as value of scalaVersion property (I see that when I modify
build script to print scalaVersion property value). Something, and I
couldn't find yet what (gradle, groovy, java, ...), has issues with dots in
property value. Escaping dots in value with backslash doesn't help, and
surrounding value with double quotes also doesn't work.

Does anyone know what's the root cause and have a solution for this issue?

Kind regards,
Stevo Slavic

Re: Building Kafka 0.8.1 branch with specific Scala version

Posted by Stevo Slavić <ss...@gmail.com>.
Found that the posh-git shell which comes with GitHub for Windows is
causing this odd CLI behavior (see here for related discussion on Gradle
forum:
http://forums.gradle.org/gradle/topics/which_characters_are_allowed_in_value_of_gradle_project_properties)


On Wed, Apr 9, 2014 at 3:13 PM, Stevo Slavić <ss...@gmail.com> wrote:

> Hello Kafka community,
>
> I'm trying to import Kafka, 0.8.1 branch, in eclipse IDE.
> Gradle eclipse plugin is already applied in Kafka build script.
>
> If I just run "gradle eclipse", default scala 2.8.0 will be used to
> generate eclipse project files, so classpath will exclude
> kafka/utils/Annotations_2.9+.scala and include
> kafka/utils/Annotations_2.8.scala instead. With eclipse using scala 2.10,
> such Kafka eclipse project doesn't compile. Manual adjusting of classpath
> is possible but dirty.
>
> So, I want to use scala 2.10.x for Kafka build. Instructions in Kafka's
> readme.md mentions scalaVersion property should be used. Has anyone used
> it? I doubt, since it doesn't work.
>
> If I run "gradle -PscalaVersion=2.10.1 eclipse", it seems only "2" will be
> recognized as value of scalaVersion property (I see that when I modify
> build script to print scalaVersion property value). Something, and I
> couldn't find yet what (gradle, groovy, java, ...), has issues with dots in
> property value. Escaping dots in value with backslash doesn't help, and
> surrounding value with double quotes also doesn't work.
>
> Does anyone know what's the root cause and have a solution for this issue?
>
> Kind regards,
> Stevo Slavic
>