13

What is the repository for the current version of scrooge-sbt-plugin? Or are the setup instructions outdated?

According to the documentation, I added this to a Play Framework project:

In project/plugins.sbt

addSbtPlugin("com.twitter" %% "scrooge-sbt-plugin" % "3.3.2")

In build.sbt:

com.twitter.scrooge.ScroogeSBT.newSettings

libraryDependencies ++= Seq(
  "org.apache.thrift" % "libthrift" % "0.8.0",
  "com.twitter" %% "scrooge-core" % "3.3.2",
  "com.twitter" %% "finagle-thrift" % "6.5.0"
)

After play clean-all and play-compile I get this output:

[warn]  module not found: com.twitter#scrooge-sbt-plugin;3.3.2
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.twitter/scrooge-sbt-plugin/scala_2.10/sbt_0.13/3.3.2/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.twitter/scrooge-sbt-plugin/scala_2.10/sbt_0.13/3.3.2/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /opt/play-2.2.0/repository/local/com.twitter/scrooge-sbt-plugin/scala_2.10/sbt_0.13/3.3.2/ivys/ivy.xml
[warn] ==== Maven2 Local: tried
[warn]   file:/home/fernando/.m2/repository/com/twitter/scrooge-sbt-plugin_2.10_0.13/3.3.2/scrooge-sbt-plugin-3.3.2.pom
[warn] ==== sonatype-oss-snapshots: tried
[warn]   http://oss.sonatype.org/content/repositories/snapshots/com/twitter/scrooge-sbt-plugin_2.10_0.13/3.3.2/scrooge-sbt-plugin-3.3.2.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/twitter/scrooge-sbt-plugin_2.10_0.13/3.3.2/scrooge-sbt-plugin-3.3.2.pom
[warn] ==== Typesafe repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/twitter/scrooge-sbt-plugin_2.10_0.13/3.3.2/scrooge-sbt-plugin-3.3.2.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.twitter#scrooge-sbt-plugin;3.3.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.twitter:scrooge-sbt-plugin:3.3.2 (sbtVersion=0.13, scalaVersion=2.10)
[warn] 
sbt.ResolveException: unresolved dependency: com.twitter#scrooge-sbt-plugin;3.3.2: not found

There seems to be a version 3.3.1 at maven.twttr.com. What about version 3.3.2? I couldn't find it at mvnrepository.com or oss.sonatype.org.

Fernando Correia
  • 20,349
  • 10
  • 79
  • 113

2 Answers2

7

The repository is on https://oss.sonatype.org/content/groups/public.


With a look into the Build.scala you can find out to which repository they publish.

If you look into https://oss.sonatype.org/content/groups/public/com/twitter/ and search for "scrooge-sbt-plugin" you fill find folders that ends with "_0.12", so it is published there as SBT 0.12.x plugin. You probably can't use this plugin for Play 2.2.x since it uses SBT 0.13.x.

Version 3.3.2 is not the latest release and I had problems to resolve all files. Using 3.9.2 works:

project/build.properties mus contain SBT 0.12 (example):

sbt.version=0.12.2

project/plugins.sbt must contain the resolver:

resolvers += "sonatype" at "https://oss.sonatype.org/content/groups/public"

addSbtPlugin("com.twitter" %% "scrooge-sbt-plugin" % "3.9.2") 

And finally build.sbt or Build.scala must contain:

com.twitter.scrooge.ScroogeSBT.newSettings

scalaVersion := "2.10.1"

libraryDependencies ++= Seq(
  "org.apache.thrift" % "libthrift" % "0.8.0",
  "com.twitter" %% "scrooge-core" % "3.9.2",
  "com.twitter" %% "finagle-thrift" % "6.5.0"
) 
Schleichardt
  • 7,385
  • 1
  • 22
  • 36
-1

First of all, version 3.16.3 is the latest version for sbt 0.13.x

What do you mean by repository?

The code repository is on GitHub, all of the Scrooge stuff including the sbt-plugin stuff are all there.

As for the artifact repository, I am pretty sure it's on maven central or some other standard repo. You should not have to add a resolver to your sbt build. But if you do for some reason than the sonatype one mentioned by @Schleichardt seems about right.

jedesah
  • 2,835
  • 1
  • 15
  • 27
  • Issued a PR to try and put this piece of information in it's rightful place. https://github.com/twitter/scrooge/pull/150 – jedesah Sep 24 '14 at 20:56
  • So... did this get merged? Because it seems like this only bumps the `scrooge-core` version not the `scrooge-sbt-plugin` version. – Andriy Drozdyuk Oct 28 '15 at 13:34
  • It did not get merged, but supposedly it was updated by some other commit...Can't vouch for that. Consider using Remotely (http://oncue.github.io/remotely/) for a better experience if you are not tied into Thrift. Good luck! – jedesah Oct 28 '15 at 16:47
  • I see. Not tied to anything, but I need a format for exchanging data between a system written in python and a system written in scala. Correct me if I'm wrong, but I thought that was the whole point of thrift/protobuf - system integration. – Andriy Drozdyuk Oct 28 '15 at 17:10
  • Well they kind of conflate RPC with interoperability. Sometimes if the remote nodes are using the same software stack, i.e programming language you can use an RPC framework that is better suited for that language. I think Go has an integrated RPC and Remotely would be such an option for the Scala programming language. But for your use case, sounds like you are stuck with a least common denominator solution like Thrift which does both RPC and interoperability between many languages. Sorry to hear that's the case :-) – jedesah Oct 28 '15 at 20:59