How to import a multi-module project into IntelliJ IDEA?

I got used to Spring and Maven projects, where I created a multi-module project in Maven with projects such as:

app-web
app-models
app-services
app-common

Now I am using Play Framework 2 (Scala) and sbt .

Is there a similar concept with Play and sbt so that I can combine all these projects into one IntelliJ IDEA and sbt solution?

+4
source share
2 answers

IntelliJ IDEA 13 (latest version 13.1.3 ) comes with built-in SBT support and the Ultimate version adds playback support .

sbt IDEA , ( - sbt).

build.sbt ( play new activator new [your-project-name] play-scala):

lazy val a, b, c = project

project/build.properties:

sbt.version=0.13.5

, , sbt/activator.

IDEA , File > Open... build.sbt.

enter image description here

OK, , . .

enter image description here

+8

, , :

/Build.scala:

{

  val baseDependencies = Seq(
    "org1" % "dep" % "latest.integration",
    "org2" % "dep2" % "version"
  )

  val modelDependencies = baseDependencies ++ Seq("org3" % "dep3" % "version")

  val appWeb = play.Project("app-web", "1.0", baseDependencies)

  val appModels = play.Project("app-models", "1.0", modelDependencies, path = file("modules/models"))

  val app = play.Project("app", "1.0", Nil).aggregate(appWeb, appModels)
}

"app-web", appModels / confs, application.conf, "".

, , "project (name)". , "project app-web", "", -. "", , , .

. : http://www.playframework.com/documentation/2.2.x/SBTSubProjects

+1

Source: https://habr.com/ru/post/1535290/


All Articles