Jennifer He Jennifer He - 1 year ago 84
Scala Question

Phantom Dependencies Error

I tried to integrate phantom to my project: here is my build.sbt file:

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


here is my 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))


I follow the link: https://github.com/outworkers/phantom/wiki/Integrating-phantom-in-your-project

But I still got an error: unresolved dependency: com.websudos#phantom-udt_2.11;1.27.0: not found && unresolved dependency: com.websudos#phantom-sbt_2.11;1.27.0: not found

Can anyone tell me what wrong with my code. Thanks very much.

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

Answer Source

as per the documentation, all you really need to get started is:

val phantomV = "1.27.0"

libraryDependencies ++= Seq(
  "com.websudos"  %% "phantom-dsl" % phantomV
)

I have updated the documentation to correct an error on our side, the UDT module is not yet available, keep an eye out for it in future releases.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download