在intellij 14终极中运行游戏2.3子项目应用程序

时间:2015-02-17 14:21:14

标签: scala intellij-idea playframework-2.0 sbt

我在子项目中设置了我的play 2.3 app(在根intellij项目中的模块)。 sbt编译工作正常但我无法弄清楚如何在intellij中运行play子项目。我错过了什么?

我已经设置了我的解决方案文件夹结构(简化):

  • 项目根
    • build.sbt
    • webapp(包含激活器生成的播放2.3应用)
      • 应用
      • (其他play2.3文件夹)
      • build.sbt
    • 数据(包含使用光滑的scala库)
      • src(和标准子目录)
      • build.sbt

这是根项目build.sbt:

import sbt._
import Keys._
import play.PlayScala

name := "MyApp"

version := "1.0"

lazy val commonSettings = Seq(
  organization := "com.company",
  scalaVersion := "2.11.5"
)

javacOptions ++= Seq("-source", "1.7", "-target", "1.7")

libraryDependencies ++= Seq(
  "com.typesafe.slick" % "slick_2.11" % "2.1.0",
  "org.apache.logging.log4j" % "log4j-api" % "2.1",
  "org.apache.logging.log4j" % "log4j-core" % "2.1",
  "org.slf4j" % "slf4j-nop" % "1.7.10",
  "com.typesafe" % "config" % "1.2.1",
  "mysql" % "mysql-connector-java" % "5.1.34"
)

lazy val data = project.in(file("data"))
    .settings(commonSettings: _*)

lazy val webapp = project.in(file("webapp"))
    .settings(commonSettings: _*)
    .enablePlugins(PlayScala, SbtWeb)
    .dependsOn(data)

lazy val root = project.in(file(".")).aggregate(
  webapp,
  data
)

和webapp project / plugins.sbt

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

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")

// web plugins

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

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

addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")

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

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

0 个答案:

没有答案