我尝试将幻像集成到我的项目中:这是我的build.sbt文件:
resolvers ++= Seq (
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
"Twitter Repository" at "http://maven.twttr.com",
Resolver.typesafeRepo("releases"),
Resolver.sonatypeRepo("releases"),
Resolver.bintrayRepo("websudos", "oss-releases")
)
libraryDependencies ++= {
val phantomV = "1.27.0"
Seq(
"com.websudos" %% "phantom-connectors" % phantomV,
"com.websudos" %% "phantom-dsl" % phantomV,
"com.websudos" %% "phantom-example" % phantomV,
"com.websudos" %% "phantom-finagle" % phantomV,
"com.websudos" %% "phantom-thrift" % phantomV,
"com.websudos" %% "phantom-udt" % phantomV,
"com.websudos" %% "phantom-sbt" % phantomV
)}
这是我的plugin.sbt
def websudosPattern = {
val pList = List("[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext]")
Patterns(pList, pList, true)}
resolvers ++= Seq(
Resolver.url("Maven ivy Websudos",
url(Resolver.DefaultMavenRepositoryRoot))(websudosPattern))
我点击链接:https://github.com/outworkers/phantom/wiki/Integrating-phantom-in-your-project
但我仍然有一个错误:未解决的依赖:com.websudos#phantom-udt_2.11; 1.27.0:not found&&未解决的依赖:com.websudos#phantom-sbt_2.11; 1.27.0:未找到
任何人都可以告诉我我的代码有什么问题。非常感谢。
build.sbt
scalaVersion := "2.11.6"
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")
resolvers ++= Seq(
"Java.net Maven2 Repository" at "download.java.net/maven/2/";,
"Twitter Repository" at "maven.twttr.com",
Resolver.typesafeRepo("releases"),
Resolver.sonatypeRepo("releases"),
Resolver.bintrayRepo("websudos", "oss-releases")
)
libraryDependencies ++= {
val akkaV = "2.3.9"
val sprayV = "1.3.3"
val phantomV = "1.27.0"
Seq(
"com.websudos" %% "phantom-dsl" % phantomV,
"io.spray" %% "spray-can" % sprayV,
"io.spray" %% "spray-routing" % sprayV,
"io.spray" %% "spray-testkit" % sprayV % "test",
"io.spray" %% "spray-json" % "1.3.2",
"io.spray" %% "spray-routing-shapeless2" % sprayV,
"com.typesafe.akka" %% "akka-actor" % akkaV,
"com.typesafe.akka" %% "akka-testkit" % akkaV % "test",
"org.specs2" %% "specs2-core" % "2.3.11" % "test"
)
}
答案 0 :(得分:1)
根据文档,您真正需要的是:
val phantomV = "1.27.0"
libraryDependencies ++= Seq(
"com.websudos" %% "phantom-dsl" % phantomV
)
我已更新文档以纠正我们方面的错误,UDT模块尚不可用,请在将来的版本中留意它。