播放2.0战争插件

时间:2014-10-10 04:43:17

标签: playframework-2.0 tomcat7

我是使用必须在tomcat上运行的Play 2.0播放和开发应用程序的新手。为了生成war文件,我得到依赖性错误。我不知道出了什么问题。请帮我解决这个问题。

plugins.sbt文件是:

// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.0")

addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "0.8.1")

Build.scala

import sbt._
import Keys._
import PlayProject._
import com.github.play2war.plugin._

object ApplicationBuild extends Build {

val appName         = "XMPLAR PORTAL"
val appVersion      = "1.0-SNAPSHOT"

val appDependencies = Seq(
  // Add your project dependencies here,
  "mysql" % "mysql-connector-java" % "5.1.18",
  "com.typesafe" % "play-plugins-mailer_2.9.1" % "2.0.4",
  "org.apache.directory.studio" % "org.apache.commons.io" % "2.4",
  "org.xhtmlrenderer" % "core-renderer" % "R8",
  "net.sf.jtidy" % "jtidy" % "r938",
  "com.itextpdf" % "itextpdf"  % "5.1.0"            
)

val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
).settings(Play2WarPlugin.play2WarSettings: _*)
.settings(Play2WarKeys.servletVersion := "3.0")

}

build.properties

sbt.version=0.11.2

和stacktrace是

>play war
[info] Loading project definition from App\project
[warn] module not found: com.github.play2war#play2-war-plugin;0.8.1
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.github.play2war/play
2-war-plugin/scala_2.9.1/sbt_0.11.2/0.8.1/ivys/ivy.xml
[warn] ==== local: tried
[warn] D:\Play\play-2.0\framework..\repository/local/com.github.play2war/play
2-war-plugin/scala_2.9.1/sbt_0.11.2/0.8.1/ivys/ivy.xml
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/github/play2war/play2-wa
r-plugin_2.9.1_0.11.2/0.8.1/play2-war-plugin-0.8.1.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/github/play2war/play2-war-plugin_2.9.
1_0.11.2/0.8.1/play2-war-plugin-0.8.1.pom
[warn] ==== Scala-Tools Maven2 Repository: tried
[warn] http://scala-tools.org/repo-releases/com/github/play2war/play2-war-plug
in_2.9.1_0.11.2/0.8.1/play2-war-plugin-0.8.1.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.play2war#play2-war-plugin;0.8.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that th
ese dependencies exist with the requested attributes.
[warn] com.github.play2war:play2-war-plugin:0.8.1 (sbtVersion=0.11.2, s
calaVersion=2.9.1)
[warn]
[error] {file:/App/project/}default-efa860/*:update: sbt.Resol
veException: unresolved dependency: com.github.play2war#play2-war-plugin;0.8.1:
not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

1 个答案:

答案 0 :(得分:0)

您可能需要将以下行添加到plugins.sbt

resolvers += "Play2war plugins release" at "http://repository-play-war.forge.cloudbees.com/release/"

有关详细信息,请参阅https://github.com/play2war/play2-war-plugin/wiki/Configuration