Kafka
  1. Kafka
  2. KAFKA-885

sbt package builds two kafka jars

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Invalid
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: packaging
    • Labels:

      Description

      After recent changes to sbt, ./sbt package now builds two kafka jars. One under
      ./target/scala-2.8.0/kafka_2.8.0-0.8.0-SNAPSHOT.jar
      and another under
      ./core/target/scala-2.8.0/kafka_2.8.0-0.8.0-SNAPSHOT.jar

      The former seems incorrect.

      1. 885-v1.patch
        0.5 kB
        Ashwanth F

        Issue Links

          Activity

          Jun Rao created issue -
          Jun Rao made changes -
          Field Original Value New Value
          Parent KAFKA-834 [ 12639642 ]
          Issue Type Sub-task [ 7 ] Improvement [ 4 ]
          Jun Rao made changes -
          Link This issue blocks KAFKA-833 [ KAFKA-833 ]
          Hide
          Ashwanth F added a comment - - edited

          Hi Jun Rao, even the ./contrib directory has an almost empty .jar file in ./contrib/target/scala-2.8.0. Aggregated projects in Build.scala (i.e. kafka and contrib) are exhibiting this behavior. This is because they don't have any src folders as immediate children of those base directories (root or contrib) and hence they are generating a manifest only .jar file.

          If the name as 'kafka_<version> seems confusing, we can either 1) add a build.sbt to the root folder that changes the name of the root target folder's jar to root_2.8.0-0.8-SNAPSHOT.jar. OR 2) we can change the core/target folder's output jar to core_2.8.0-0.8.0-SNAPSHOT.jar instead of kafka.

          I have added a patch for (1) just in case.

          Show
          Ashwanth F added a comment - - edited Hi Jun Rao, even the ./contrib directory has an almost empty .jar file in ./contrib/target/scala-2.8.0. Aggregated projects in Build.scala (i.e. kafka and contrib) are exhibiting this behavior. This is because they don't have any src folders as immediate children of those base directories (root or contrib) and hence they are generating a manifest only .jar file. If the name as 'kafka_<version> seems confusing, we can either 1) add a build.sbt to the root folder that changes the name of the root target folder's jar to root_2.8.0-0.8-SNAPSHOT.jar. OR 2) we can change the core/target folder's output jar to core_2.8.0-0.8.0-SNAPSHOT.jar instead of kafka. I have added a patch for (1) just in case.
          Ashwanth F made changes -
          Labels patch
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ashwanth F made changes -
          Comment [ From e1a6004b1f5f346d093bacef8e99ba43dca64985 Mon Sep 17 00:00:00 2001
          From: Ashwanth Fernando <afernando@walmart.com>
          Date: Thu, 9 May 2013 01:53:31 -0700
          Subject: [PATCH] KAFKA-885

          ---
           build.sbt | 5 +++++
           1 files changed, 5 insertions(+), 0 deletions(-)
           create mode 100644 build.sbt

          diff --git a/build.sbt b/build.sbt
          new file mode 100644
          index 0000000..4f6b8b4
          --- /dev/null
          +++ b/build.sbt
          @@ -0,0 +1,5 @@
          +import sbt._
          +import Keys._
          +
          +name := "root"
          +
          --
          1.7.5.4 ]
          Ashwanth F made changes -
          Attachment 885-v1.patch [ 12582435 ]
          Hide
          Jun Rao added a comment -

          Thanks for the patch. Is there away to not generating the top level jar at all? If not, I guess this patch is also ok and we can tak it in 0.8.

          Show
          Jun Rao added a comment - Thanks for the patch. Is there away to not generating the top level jar at all? If not, I guess this patch is also ok and we can tak it in 0.8.
          Hide
          Ashwanth F added a comment - - edited

          "Is there away to not generating the top level jar at all?" - Let me see if we can do that. Will get back to you.

          Show
          Ashwanth F added a comment - - edited "Is there away to not generating the top level jar at all?" - Let me see if we can do that. Will get back to you.
          Hide
          Jay Kreps added a comment -

          We are on gradle now.

          Show
          Jay Kreps added a comment - We are on gradle now.
          Jay Kreps made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Invalid [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Jun Rao
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development