2011-07-16 41 views
7

我下面就爲Assembla Lift wikisbt 0.10步驟,並出現以下錯誤:電梯沒有建立與sbt?

[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: UNRESOLVED DEPENDENCIES :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: com.github.mpeltonen#sbt-idea_2.8.1;0.10.0-SNAPSHOT: not found 
[warn] :: com.github.siasia#xsbt-web-plugin_2.8.1;0.10.1: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[info] 

可能是因爲這兩個網頁:

http://siasia.github.com/maven2 

http://mpeltonen.github.com/maven/ 

不存在?

build.sbt

name := "MyWeb" 

scalaVersion := "2.9.0" 

seq(WebPlugin.webSettings: _*) 

resolvers += "Web plugin repo" at "http://siasia.github.com/maven2" 
resolvers += "Web plugin repo2" at "http://mpeltonen.github.com/maven/" 


libraryDependencies ++= { 

    val liftVersion = "2.4-M1" 

    Seq(
    "net.liftweb" %% "lift-webkit" % liftVersion % "compile->default", 
    "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default", 
    "net.liftweb" %% "lift-wizard" % liftVersion % "compile->default" 
) 

} 

libraryDependencies ++= Seq(
    "junit" % "junit" % "4.5" % "test->default", 
    "org.mortbay.jetty" % "jetty" % "6.1.22" % "jetty", 
    "javax.servlet" % "servlet-api" % "2.5" % "provided->default", 
    "com.h2database" % "h2" % "1.2.138", 
    "ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default" 
) 

和插件/ build.sbt:

resolvers += "Web plugin repo" at "http://siasia.github.com/maven2" 

libraryDependencies <+= sbtVersion("com.github.siasia" %% "xsbt-web-plugin" % _) 

我在做什麼錯?

回答

13

此鏈接可能會有幫助。

https://github.com/siasia/xsbt-web-plugin

更換項目/插件/ build.sbt的內容像下面

resolvers ++= Seq(
    "Web plugin repo" at "http://siasia.github.com/maven2", 
    Resolver.url("Typesafe repository", new java.net.URL("http://typesafe.artifactoryonline.com/typesafe/ivy-releases/"))(Resolver.defaultIvyPatterns) 
) 

//Following means libraryDependencies += "com.github.siasia" %% "xsbt-web-plugin" % "0.1.0-<sbt version>"" 
libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % ("0.1.0-"+v)) 

,並在項目的根的build.sbt與seq(webSettings :_*)取代seq(WebPlugin.webSettings: _*)

+0

正是幫助 – axaluss

+0

這真的幫助我出去了。我遇到了試圖編譯現有測試的問題。我必須將碼頭行改爲'「org.mortbay.jetty」%「jetty」%「6.1.22」%「jetty,test」'並添加'「org.scala-tools.testing」%「specs_2.9.0 「%」1.6.8「%」test「'依賴關係以及 – Dylan

+0

爲什麼它是小寫的」seq「? – jpswain