scrooge-sbt-plugin的存储库是什么?

时间:2013-10-24 20:57:46

标签: scala playframework sbt thrift scrooge

当前版本的scrooge-sbt-plugin的存储库是什么?或者设置说明是否过时了?

根据the documentation,我将其添加到Play Framework项目中:

在project / plugins.sbt

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

在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"
)

play clean-allplay-compile之后,我得到了这个输出:

[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

maven.twttr.com似乎有3.3.1版本。版本3.3.2怎么样?我在mvnrepository.com或oss.sonatype.org找不到它。

2 个答案:

答案 0 :(得分:7)

存储库位于https://oss.sonatype.org/content/groups/public


通过查看Build.scala,您可以了解他们发布的存储库。

如果您查看https://oss.sonatype.org/content/groups/public/com/twitter/并搜索“scrooge-sbt-plugin”,则填写查找以“_0.12”结尾的文件夹,因此将其作为SBT 0.12.x插件发布。您可能无法在Play 2.2.x中使用此插件,因为它使用SBT 0.13.x。

版本3.3.2不是最新版本,我遇到了解决所有文件的问题。使用3.9.2工作:

project / build.properties mus包含SBT 0.12(示例):

sbt.version=0.12.2

project / plugins.sbt必须包含解析器:

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

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

最后build.sbt或Build.scala必须包含:

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"
) 

答案 1 :(得分:-1)

首先,版本3.16.3是sbt 0.13.x的最新版本

您对存储库的意思是什么?

代码存储库在GitHub上,包括sbt-plugin在内的所有Scrooge东西都在那里。

至于工件库,我很确定它是关于maven中心或其他一些标准的回购。您不必在sbt构建中添加解析器。但是,如果你出于某种原因,那个@Schleichardt提到的sonatype似乎是正确的。