播放framework-2.3.10应用程序启动问题

时间:2015-10-05 12:43:32

标签: playframework-2.0

我刚刚从第一场比赛开始参加比赛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 个答案:

答案 0 :(得分:1)

在mac OSX和提供的元素上使用typesafe-activator 1.3.5,我无法重现这个问题。 但是,我很确定您只提供了构建定义(build.sbt)的摘录,其中应包含名称,版本,可能包含组织。除非您提供完整的文件,否则很难说出错了。

在任何情况下,问题都是由于某种原因,您构建无法解决项目的某些传递依赖项。将这些依赖项添加为您所做的显式依赖项将无济于事。

我还建议从构建中删除sbt-idea插件(通常在project/plugins.sbt中定义插件),这应该至少删除其中一个错误。目前的intellij版本能够导入(和刷新)sbt构建,使sbt插件更加不那么有趣。

你也可以寻找一个关键提及"解析器"在构建文件中(根目录中的任何.sbt文件,project目录中的任何.sbt文件,project目录中的任何.scala类)

如果构建定义是超级机密,您可以在已清理/匿名的项目中重现该问题并将其发布。