2015-10-05 32 views
0

我剛剛從播放1移動到播放2.3.10。播放框架-2.3.10應用程序啓動問題

我創建了我的應用程序。

download activator. 

cd activator-dir 
./activator new myapp ply-java 

cd myapp 
activator 

錯誤:

Resolving org.fusesource.jansi#jansi;1.4 ... 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: commons-io#commons-io;2.0.1: configuration not found in commons-io#commons-io;2.0.1: 'master(compile)'. Missing configuration: 'compile'. It was required from com.github.mpeltonen#sbt-idea;1.5.1 compile 
[warn] :: commons-io#commons-io;2.4: configuration not found in commons-io#commons-io;2.4: 'master(compile)'. Missing configuration: 'compile'. It was required from net.sourceforge.htmlunit#htmlunit;2.14 compile 
[warn] :: org.slf4j#slf4j-api;1.7.7: configuration not found in org.slf4j#slf4j-api;1.7.7: 'master(compile)'. Missing configuration: 'compile'. It was required from org.webjars#webjars-locator;0.21 compile 
[warn] :: commons-collections#commons-collections;3.2.1: configuration not found in commons-collections#commons-collections;3.2.1: 'master(compile)'. Missing configuration: 'compile'. It was required from net.sourceforge.htmlunit#htmlunit;2.14 compile 
[warn] :: commons-logging#commons-logging;1.1.3: configuration not found in commons-logging#commons-logging;1.1.3: 'master(compile)'. Missing configuration: 'compile'. It was required from net.sourceforge.htmlunit#htmlunit;2.14 compile 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 



[error] (*:update) sbt.ResolveException: unresolved dependency: commons-io#commons-io;2.0.1: configuration not found in commons-io#commons-io;2.0.1: 'master(compile)'. Missing configuration: 'compile'. It was required from com.github.mpeltonen#sbt-idea;1.5.1 compile 
[error] unresolved dependency: commons-io#commons-io;2.4: configuration not found in commons-io#commons-io;2.4: 'master(compile)'. Missing configuration: 'compile'. It was required from net.sourceforge.htmlunit#htmlunit;2.14 compile 
[error] unresolved dependency: org.slf4j#slf4j-api;1.7.7: configuration not found in org.slf4j#slf4j-api;1.7.7: 'master(compile)'. Missing configuration: 'compile'. It was required from org.webjars#webjars-locator;0.21 compile 
[error] unresolved dependency: commons-collections#commons-collections;3.2.1: configuration not found in commons-collections#commons-collections;3.2.1: 'master(compile)'. Missing configuration: 'compile'. It was required from net.sourceforge.htmlunit#htmlunit;2.14 compile 
[error] unresolved dependency: commons-logging#commons-logging;1.1.3: configuration not found in commons-logging#commons-logging;1.1.3: 'master(compile)'. Missing configuration: 'compile'. It was required from net.sourceforge.htmlunit#htmlunit;2.14 compile 
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q 

我不知道究竟是什麼導致了問題。我試圖將這些依賴關係添加到build.sbt中,但仍然出現此錯誤。

編輯

激活版本:SBT發射版本0.13.5

SBT-FILE:

name := """MyApp""" 

version := "1.0-SNAPSHOT" 

lazy val root = (project in file(".")).enablePlugins(PlayJava) 

scalaVersion := "2.11.1" 

libraryDependencies ++= Seq(
     javaJdbc, 
     cache, 
     javaWs, 
     "commons-io" % "commons-io" % "2.4", 
     "org.slf4j" % "slf4j-api" % "1.7.7" 


    ) 

// Play provides two styles of routers, one expects its actions to be injected, the 
// other, legacy style, accesses its actions statically. 
//routesGenerator := InjectedRoutesGenerator 
+1

你好,你可以發佈'activator --version'的結果,目錄中的任何「.sbt」文件的內容和'project/build.properties'的內容嗎? – Jean

+0

編輯我的問題 –

回答

1

在Mac OSX和所提供的使用類型安全的激活因子1.3.5元素,我不能重現這個問題。 但是,我非常肯定你只提供了構建定義的摘錄(build.sbt),它應該包含名稱,版本,可能是組織。除非你提供完整的文件,否則很難說出什麼是錯的。

在任何情況下,問題是由於某種原因,您構建無法解決項目的一些傳遞性依賴關係。像你一樣將這些依賴關係作爲顯式依賴關係添加,將無濟於事。

我也建議從你的版本中刪除sbt-idea插件(通常插件在project/plugins.sbt中定義),它應該至少刪除一個錯誤。目前的intellij版本能夠導入(並刷新)sbt版本,使得sbt插件更加有趣。

你也可以找一個關鍵的構建文件提到「解析器」(在根目錄下的任何文件名.bst在project目錄中的任何文件名.bst在project目錄中的任何.scala類)

如果構建定義是超高機密的,您可以在已清理/匿名項目中重現問題,然後發佈。

+0

我發佈了我的版本。當我創建我的應用程序時,該構建是由激活器生成的。 當我得到的問題,我試圖通過添加依賴關係,但仍然錯誤 –

+0

我也嘗試通過從plugins.sbt文件除去播放插件除去所有額外的插件。但錯誤不會消失 –

+1

我有一個解決方案。 .invy.cache已損壞。我刪除了.invy目錄並運行激活器命令。那個錯誤消失了。 :) –