我正在使用GeoJSON编写一个Play框架应用程序,我计划使用play-gejson。当我按照指示将依赖项添加到build.sbt
时,激活器找不到它。
以下是我应该补充的内容:
"com.typesafe.play.extras" %% "play-geojson" % "1.0.0"
有什么想法吗?
更新
我也尝试添加以下解析器 - 无济于事。
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
这是错误:
ecf-db| activator run
[info] Loading project definition from /Users/michael/Documents/Consulting/sayarch/ECF/Conflict-Database/ecf-db/app/ecf-db/project
[info] Set current project to ecf-db (in build file:/Users/michael/Documents/Consulting/sayarch/ECF/Conflict-Database/ecf-db/app/ecf-db/)
[info] Updating {file:/Users/michael/Documents/Consulting/sayarch/ECF/Conflict-Database/ecf-db/app/ecf-db/}root...
[info] Resolving org.scala-lang.plugins#scala-continuations-library_2.11;1.0.1 .[info] Resolving com.typesafe.play.extras#play-geojson_2.11;1.0.0 ...
[warn] module not found: com.typesafe.play.extras#play-geojson_2.11;1.0.0
[warn] ==== local: tried
[warn] /Users/michael/.ivy2/local/com.typesafe.play.extras/play-geojson_2.11/1.0.0/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn] file:/usr/local/Cellar/typesafe-activator/1.2.12/libexec/repository/com.typesafe.play.extras/play-geojson_2.11/1.0.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/typesafe/play/extras/play-geojson_2.11/1.0.0/play-geojson_2.11-1.0.0.pom
[warn] ==== typesafe-releases: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/typesafe/play/extras/play-geojson_2.11/1.0.0/play-geojson_2.11-1.0.0.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play.extras/play-geojson_2.11/1.0.0/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] https://repo.typesafe.com/typesafe/releases/com/typesafe/play/extras/play-geojson_2.11/1.0.0/play-geojson_2.11-1.0.0.pom
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/typesafe/play/extras/play-geojson_2.11/1.0.0/play-geojson_2.11-1.0.0.pom
[info] Resolving jline#jline;2.11 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.play.extras#play-geojson_2.11;1.0.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.typesafe.play.extras#play-geojson_2.11;1.0.0: not found
构建文件:
name := """XXXXXXXX"""
version := "0.1-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
organization := "XXXXXXXXXX"
scalaVersion := "2.11.1"
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws,
"org.webjars" %% "webjars-play" % "2.3.0-2",
"org.webjars" % "bootstrap" % "3.1.1-2",
"org.webjars" % "jquery" % "2.1.3",
"org.webjars" % "font-awesome" % "4.2.0",
"com.typesafe.play.extras" %% "play-geojson" % "1.0.0"
)
LessKeys.compress in Assets := true
includeFilter in (Assets, LessKeys.less) := "*.less"
答案 0 :(得分:1)
似乎自最新版本以来README
尚未更新。 1.0.0仅针对Scala 2.10而不是2.11构建。但是1.1.5已经为Scala 2.10和2.11交叉构建。只需将版本提升到1.1.0:
"com.typesafe.play.extras" %% "play-geojson" % "1.1.0"
(或者,如果出于某种原因需要1.0.0,可以使用Scala 2.10)