Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the repository for scrooge-sbt-plugin?

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.

like image 649
Fernando Correia Avatar asked Oct 24 '13 20:10

Fernando Correia


People also ask

Where are SBT plugins stored?

Plugins can be installed for all your projects at once by declaring them in $HOME/. sbt/1.0/plugins/ . $HOME/. sbt/1.0/plugins/ is an sbt project whose classpath is exported to all sbt build definition projects.

What is an SBT plugin?

A plugin can define a sequence of sbt settings that are automatically added to all projects or that are explicitly declared for selected projects. For example, a plugin might add a proguard task and associated (overridable) settings. Finally, a plugin can define new commands (via the commands setting).


1 Answers

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"
) 
like image 169
Schleichardt Avatar answered Sep 20 '22 15:09

Schleichardt