首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Play + Play2War

Play + Play2War
EN

Stack Overflow用户
提问于 2015-08-06 22:54:07
回答 1查看 386关注 0票数 1

全。

我用的是一个剧本框架项目。我想在tomcat服务器上运行我的项目,我有问题,使用Play2War创建war文件。使用Play 2.4.2版本。

plugins.sbt

代码语言:javascript
复制
// 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("com.typesafe.play" % "sbt-plugin" % Option(System.getProperty("play.version")).getOrElse("2.4.0"))

addSbtPlugin("com.typesafe.sbt" %% "sbt-play-ebean" % "1.0.0")

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

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

// TODO: find a way to automatically load sbt plugins of projects we depend on // if you see this and know how to do it, please open a pull request :)

// Uncomment the next line for local development of the Play Authentication core: //addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

// Uncomment the next line for local development of the Play Authentication core: //addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8.5")

addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")

build.sbt

代码语言:javascript
复制
import com.github.play2war.plugin._

organization := "myhome"

name := "myapp"

scalaVersion := "2.11.6"

version := "1.0-SNAPSHOT"

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

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

Play2WarPlugin.play2WarSettings

// Servlet version compatible with Tomcat 7
// See https://github.com/play2war/play2-war-plugin#server-compatibility
Play2WarKeys.servletVersion := "3.0"

val appDependencies = Seq(
  "be.objectify"  %% "deadbolt-java"     % "2.4.0",
  // Comment the next line for local development of the Play Authentication core:
  "com.feth"      %% "play-authenticate" % "0.7.0-SNAPSHOT",
  "org.postgresql"    %  "postgresql"        % "9.4-1201-jdbc41",
  cache,
  javaWs,
  javaJdbc,
  "org.abstractmeta" % "compilation-toolbox" % "0.3.3",
  "org.reflections" % "reflections" % "0.9.9-RC1",
  "org.beanshell" % "bsh" % "2.0b5",
  "org.webjars" % "jquery" % "2.1.4",
  "org.webjars" % "bootstrap" % "3.3.5" exclude("org.webjars", "jquery"),
  "org.easytesting" % "fest-assert" % "1.4" % "test"
)

// add resolver for deadbolt an     d easymail snapshots
resolvers += Resolver.sonatypeRepo("snapshots")

//  Uncomment the next line for local development of the Play Authenticate core:
//lazy val playAuthenticate = project.in(file("modules/play-authenticate")).enablePlugins(PlayJava)

lazy val root = project.in(file("."))
  .enablePlugins(PlayJava, PlayEbean)
  .settings(
    libraryDependencies ++= appDependencies
  )
  /* Uncomment the next lines for local development of the Play Authenticate core: */
  //.dependsOn(playAuthenticate)
  //.aggregate(playAuthenticate)

includeFilter in (Assets, LessKeys.less) := "*.less"

// for minified *.min.css files
LessKeys.compress := true


fork in run := true

错误:

代码语言:javascript
复制
[error] (*:update) sbt.ResolveException: unresolved dependency: com.github.play2war#play2-war-plugin;1.4-beta1: not found
[error] Total time: 12 s, completed 07.08.2015 1:33:14

我做错什么了?帮帮我,拜托

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-08-06 23:15:36

你把事情搞混了。

addSbtPlugin(...)的所有实例保存在plugins.sbt中,将resolvers += ...的所有实例保存在build.sbt上。同时,试着把它们组织起来,看看结果如何。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31867085

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档