Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import multi-module project in IntelliJ IDEA?

I'm used to Spring and Maven projects where I set up a multi-module project in Maven with projects like:

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

I'm now getting into using Play Framework 2 (Scala) and sbt.

Is there a similar concept with Play and sbt that I could group all of these projects into a single IntelliJ IDEA solution and sbt?

like image 664
Blankman Avatar asked Apr 07 '14 00:04

Blankman


1 Answers

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

A multi-module sbt project can be imported to IDEA and is fully supported out of the box however it's Play-based or not (they're sbt projects after all).

You should try it out yourself with the following very simplistic build file build.sbt (or just generate a Play project with play new or better now activator new [your-project-name] play-scala):

lazy val a, b, c = project

and the following project/build.properties:

sbt.version=0.13.5

Nothing but these two above files are needed to get you started with sbt/activator.

In IDEA, open the project using File > Open... and select build.sbt.

enter image description here

Click OK to see another window where you specify additional configuration options for the project. Then the modules show up.

enter image description here

like image 142
Jacek Laskowski Avatar answered Oct 24 '22 02:10

Jacek Laskowski