Kafka
  1. Kafka
  2. KAFKA-809

Dependency on zkclient 0.1 (redundant) prevents building in IntelliJ

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: None
    • Labels:

      Description

      Per email thread from 3/14/2013; patch with fix included at the end of the description.

      Thanks for looking into this, Dragos. We should remove ""com.github.sgroschupf"
      % "zkclient" % "0.1"," from the build.sbt files. Would you like to
      create a JIRA and/or attach a patch ?

      -Neha

      On Thu, Mar 14, 2013 at 5:21 PM, Dragos Manolescu <
      Dragos.Manolescu@servicenow.com> wrote:

      I dug into this and found a problem. The kafka build files show
      dependencies on two different versions of the zkclient code:

      In core/build.sbt:

      libraryDependencies ++= Seq(
      "org.apache.zookeeper" % "zookeeper" % "3.3.4",
      "com.github.sgroschupf" % "zkclient" % "0.1",
      "org.xerial.snappy" % "snappy-java" % "1.0.4.1",
      "org.easymock" % "easymock" % "3.0" % "test",
      "junit" % "junit" % "4.1" % "test"
      )

      And in project/Build.scala:

      // POM Tweaking for core:
      def zkClientDep =
      <dependency>
      <groupId>zkclient</groupId>
      <artifactId>zkclient</artifactId>
      <version>20120522</version>
      <scope>compile</scope>
      </dependency>

      In version 0.1 of com.github.sgroschupf.ZkClient (listed in build.sbt)
      writeData doesn't return anything (http://j.mp/XBnn5g), which causes the
      compile error from my initial message (see below); that changed in 0.2
      (http://j.mp/WqUx4x).

      zkclient-20120522 (listed in Build.scala) is checked in as a JAR in the
      core/lib folder (http://j.mp/10U4XgE).

      I haven't researched why between sbt and IntelliJ ZkClient resolves
      differently, and don't know the history behind the "POM tweaking" comment
      above. I was able to build Kafka in IntelliJ by removing the reference to
      com.github.sgroschupf.ZkClient. Perhaps this is a leftover from 0.7.2 (I
      if I recall correctly it depends on 0.1)?

      At any rate if anybody runs into similar problems when building in InteliJ
      I hope that this fix addresses them. Comments welcome.

      Thanks,

      -Dragos

      Index: core/build.sbt
      IDEA additional info:
      Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
      <+>UTF-8
      Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
      <>import sbt.\nimport Keys.\n\nname := \"kafka\"\n\nresolvers ++= Seq(\n \"SonaType ScalaTest repo\" at \"https://oss.sonatype.org/content/groups/public/org/scalatest/\"\n)\n\nlibraryDependencies <= scalaVersion(\"org.scala-lang\" % \"scala-compiler\" % _ )\n\nlibraryDependencies += Seq(\n \"org.apache.zookeeper\" % \"zookeeper\" % \"3.3.4\",\n \"com.github.sgroschupf\" % \"zkclient\" % \"0.1\",\n \"org.xerial.snappy\" % \"snappy-java\" % \"1.0.4.1\",\n \"org.easymock\" % \"easymock\" % \"3.0\" % \"test\",\n \"junit\" % \"junit\" % \"4.1\" % \"test\"\n)\n\nlibraryDependencies <<= (scalaVersion, libraryDependencies) { (sv, deps) =>\n deps : (sv match

      {\n case \"2.8.0\" => \"org.scalatest\" % \"scalatest\" % \"1.2\" % \"test\"\n case _ => \"org.scalatest\" %% \"scalatest\" % \"1.8\" % \"test\"\n }

      )\n}\n\n\n
      ===================================================================
      — core/build.sbt (revision 3b3fb7fed622cc0339c3b9e3fb175e6093e427a3)
      +++ core/build.sbt (revision )
      @@ -11,7 +11,6 @@

      libraryDependencies ++= Seq(
      "org.apache.zookeeper" % "zookeeper" % "3.3.4",

      • "com.github.sgroschupf" % "zkclient" % "0.1",
        "org.xerial.snappy" % "snappy-java" % "1.0.4.1",
        "org.easymock" % "easymock" % "3.0" % "test",
        "junit" % "junit" % "4.1" % "test"

        Activity

        Dragos Manolescu created issue -
        Hide
        Dragos Manolescu added a comment -

        Index: core/build.sbt
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        — core/build.sbt (date 1364250148000)
        +++ core/build.sbt (date 1364252653000)
        @@ -11,7 +11,6 @@

        libraryDependencies ++= Seq(
        "org.apache.zookeeper" % "zookeeper" % "3.3.4",

        • "com.github.sgroschupf" % "zkclient" % "0.1",
          "org.xerial.snappy" % "snappy-java" % "1.0.4.1",
          "org.easymock" % "easymock" % "3.0" % "test",
          "junit" % "junit" % "4.1" % "test"
          Index: project/Build.scala
          IDEA additional info:
          Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
          <+>UTF-8
          ===================================================================
            • project/Build.scala (date 1364250148000)
              +++ project/Build.scala (date 1364252653000)
              @@ -34,7 +34,8 @@
              libraryDependencies ++= Seq(
              "log4j" % "log4j" % "1.2.15",
              "net.sf.jopt-simple" % "jopt-simple" % "3.2",
        • "org.slf4j" % "slf4j-simple" % "1.6.4"
          + "org.slf4j" % "slf4j-simple" % "1.6.4",
          + "com.101tec" % "zkclient" % "0.2"
          ),
          // The issue is going from log4j 1.2.14 to 1.2.15, the developers added some features which required
          // some dependencies on various sun and javax packages.
          @@ -100,9 +101,9 @@
          // POM Tweaking for core:
          def zkClientDep =
          <dependency>
        • <groupId>zkclient</groupId>
          + <groupId>com.101tec</groupId>
          <artifactId>zkclient</artifactId>
        • <version>20120522</version>
          + <version>0.2</version>
          <scope>compile</scope>
          </dependency>

        @@ -116,7 +117,7 @@
        </dependency>
        <dependency>
        <groupId>com.yammer.metrics</groupId>

        • <artifactId>metrics-annotations</artifactId>
          + <artifactId>metrics-annotation</artifactId>
          <version>3.0.0-c0c8be71</version>
          <scope>compile</scope>
          </dependency>
          Index: project/build/KafkaProject.scala
          IDEA additional info:
          Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
          <+>UTF-8
          ===================================================================
            • project/build/KafkaProject.scala (date 1364250148000)
              +++ project/build/KafkaProject.scala (date 1364252653000)
              @@ -74,7 +74,7 @@
              <dependency>
              <groupId>com.yammer.metrics</groupId>
              <artifactId>metrics-core</artifactId>
        • <version>3.0.0-SNAPSHOT</version>
          + <version>3.0.0-c0c8be71</version>
          <scope>compile</scope>
          </dependency>

        @@ -82,7 +82,7 @@
        <dependency>
        <groupId>com.yammer.metrics</groupId>
        <artifactId>metrics-annotation</artifactId>

        • <version>3.0.0-SNAPSHOT</version>
          + <version>3.0.0-c0c8be71</version>
          <scope>compile</scope>
          </dependency>
        Show
        Dragos Manolescu added a comment - Index: core/build.sbt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== — core/build.sbt (date 1364250148000) +++ core/build.sbt (date 1364252653000) @@ -11,7 +11,6 @@ libraryDependencies ++= Seq( "org.apache.zookeeper" % "zookeeper" % "3.3.4", "com.github.sgroschupf" % "zkclient" % "0.1", "org.xerial.snappy" % "snappy-java" % "1.0.4.1", "org.easymock" % "easymock" % "3.0" % "test", "junit" % "junit" % "4.1" % "test" Index: project/Build.scala IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== project/Build.scala (date 1364250148000) +++ project/Build.scala (date 1364252653000) @@ -34,7 +34,8 @@ libraryDependencies ++= Seq( "log4j" % "log4j" % "1.2.15", "net.sf.jopt-simple" % "jopt-simple" % "3.2", "org.slf4j" % "slf4j-simple" % "1.6.4" + "org.slf4j" % "slf4j-simple" % "1.6.4", + "com.101tec" % "zkclient" % "0.2" ), // The issue is going from log4j 1.2.14 to 1.2.15, the developers added some features which required // some dependencies on various sun and javax packages. @@ -100,9 +101,9 @@ // POM Tweaking for core: def zkClientDep = <dependency> <groupId>zkclient</groupId> + <groupId>com.101tec</groupId> <artifactId>zkclient</artifactId> <version>20120522</version> + <version>0.2</version> <scope>compile</scope> </dependency> @@ -116,7 +117,7 @@ </dependency> <dependency> <groupId>com.yammer.metrics</groupId> <artifactId>metrics-annotations</artifactId> + <artifactId>metrics-annotation</artifactId> <version>3.0.0-c0c8be71</version> <scope>compile</scope> </dependency> Index: project/build/KafkaProject.scala IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== project/build/KafkaProject.scala (date 1364250148000) +++ project/build/KafkaProject.scala (date 1364252653000) @@ -74,7 +74,7 @@ <dependency> <groupId>com.yammer.metrics</groupId> <artifactId>metrics-core</artifactId> <version>3.0.0-SNAPSHOT</version> + <version>3.0.0-c0c8be71</version> <scope>compile</scope> </dependency> @@ -82,7 +82,7 @@ <dependency> <groupId>com.yammer.metrics</groupId> <artifactId>metrics-annotation</artifactId> <version>3.0.0-SNAPSHOT</version> + <version>3.0.0-c0c8be71</version> <scope>compile</scope> </dependency>
        Dragos Manolescu made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s 0.8 [ 12317244 ]
        Hide
        Neha Narkhede added a comment -

        Looks like the fix can go in as part of KAFKA-826

        Show
        Neha Narkhede added a comment - Looks like the fix can go in as part of KAFKA-826
        Neha Narkhede made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Dragos Manolescu [ dragosm ]
        Resolution Won't Fix [ 2 ]
        Neha Narkhede made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Dragos Manolescu
            Reporter:
            Dragos Manolescu
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development