[ 
https://issues.apache.org/jira/browse/KAFKA-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105299#comment-14105299
 ] 

Stevo Slavic commented on KAFKA-1419:
-------------------------------------

{{bin/windows/kafka-run-class.bat}} still reference 2.8.0.

Both {{kafka-run-class.sh}} and {{kafka-run-class.bat}} are broken for scala 
versions where scala version is not equal to scala binary version, like 2.10.1 
where binary version is 2.10. 

More specifically classpath addition for kafka core is wrong.
In {{kafka-run-class.bat}} instead of
{noformat}
%BASE_DIR%\core\build\libs\kafka_%SCALA_VERSION%*.jar
{noformat}

there should be something like:

{noformat}
%BASE_DIR%\core\build\libs\kafka_%SCALA_BINARY_VERSION%*.jar
{noformat}

Similarly, in {{kafka-run-class.sh}} instead of
{noformat}
for file in $base_dir/core/build/libs/kafka_${SCALA_VERSION}*.jar;
do
  CLASSPATH=$CLASSPATH:$file
done
{noformat}

there should be something like
{noformat}
for file in $base_dir/core/build/libs/kafka_${SCALA_BINARY_VERSION}*.jar;
do
  CLASSPATH=$CLASSPATH:$file
done
{noformat}



This will require adding one more variable for scala binary version, in both 
mentioned scripts.

e.g. in {{kafka-run-class.sh}} from

{noformat}
if [ -z "$SCALA_VERSION" ]; then
        SCALA_VERSION=2.10.1
fi
{noformat}

to

{noformat}
if [ -z "$SCALA_VERSION" ]; then
        SCALA_VERSION=2.10.1
fi

if [ -z "$SCALA_BINARY_VERSION" ]; then
        SCALA_BINARY_VERSION=2.10
fi
{noformat}

and in {{kafka-run-class.bat}}, from

{noformat}
IF ["%SCALA_VERSION%"] EQU [""] (
  set SCALA_VERSION=2.10.1
)
{noformat}

to

{noformat}
IF ["%SCALA_VERSION%"] EQU [""] (
  set SCALA_VERSION=2.10.1
)

IF ["%SCALA_BINARY_VERSION%"] EQU [""] (
  set SCALA_BINARY_VERSION=2.10
)
{noformat}

> cross build for scala 2.11
> --------------------------
>
>                 Key: KAFKA-1419
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1419
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>    Affects Versions: 0.8.1
>            Reporter: Scott Clasen
>            Assignee: Ivan Lyutov
>            Priority: Blocker
>             Fix For: 0.8.2
>
>         Attachments: KAFKA-1419.patch, KAFKA-1419.patch, 
> KAFKA-1419_2014-07-28_15:05:16.patch, KAFKA-1419_2014-07-29_15:13:43.patch, 
> KAFKA-1419_2014-08-04_14:43:26.patch, KAFKA-1419_2014-08-05_12:51:16.patch, 
> KAFKA-1419_2014-08-07_10:17:34.patch, KAFKA-1419_2014-08-07_10:52:18.patch
>
>
> Please publish builds for scala 2.11, hopefully just needs a small tweak to 
> the gradle conf?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to