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

标签 scala playframework sbt thrift scrooge

当前版本的 scrooge-sbt-plugin 的存储库是什么?还是设置说明已过时?

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

在项目/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 上找不到它。

最佳答案

存储库位于 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 必须包含 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"
) 

关于scala - scrooge-sbt-plugin 的存储库是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19576513/

相关文章:

JavaFX 和回调

java - 在 Spark 中读取自定义序列文件

algorithm - Spark中的FPGrowth算法

scala - 如何在 Play 2.3.4 中设置 Assets 指纹?

java - Play框架1.2.5中的GSON错误

playframework - 如何在 PlayFramework 项目中使用 logback

java - activator 1.3.0 导致 sbt 项目出错?

scala - 如何运行使用 Simple Build Tool 创建的包?

scala - SBT 0.13.1 离线

android - 如何将现有的基于 IDEA Scala 的 Android 项目迁移到 SBT?