0

I'm working on 2 projects in Eclipse on Windows. They're kept in their own separate folders. Their folders are located here: W:\scala\eclipse\sdtcore W:\scala\eclipse\sdttools

The development effort for these two projects are ongoing and therefore I haven't made JARs for them. I prefer to continue developing in Eclipse.

What I'd like is to include these two projects / their source code in a Scala Play Play project. At the moment I've tried using Typesafe Activator to generate a Play project, but I simply cannot modify the build.sbt file in a satisfactory way which can get this to work. In time I'd also prefer developing in Eclipse, but for now I can live with a simple text editor (it seems somewhat buggy/not straightforward getting it to work in Eclipse - or IntelliJ for that matter).

I'd prefer to keep my Play project in this folder for now: W:\scala\practice\play

I am somewhat new to both Play and SBT, but have gone through some tutorials regarding SBT and subprojects and got it work - however not with a project structure like the one described. Instead I've ran against the wall with error messages complaining that my subprojects to not belong to the root folder of the project.

Can it be done? How should I go about? Simpliest, easiest course of action.

Johny T Koshy
  • 3,857
  • 2
  • 23
  • 40
slaursen
  • 83
  • 1
  • 3

1 Answers1

0

See the documentation here: http://www.scala-sbt.org/0.13/docs/Multi-Project.html

In the build.sbt of the play project try:

lazy val playProj = (project in file("."))
                      .dependsOn(stdcore)
                      .dependsOn(sdttools)

lazy val stdcore = (project in file("W:\scala\eclipse\sdtcore")) // I am not sure for the path though as I have no windows machine to try at hand
lazy val sdttools = (project in file("W:\scala\eclipse\sdttools"))
Andreas Neumann
  • 10,734
  • 1
  • 32
  • 52
  • It did not work... `lazy val root = (project in file(".")) .enablePlugins(PlayScala) .dependsOn(sdtcore) // added .dependsOn(sdttools) // added // added -> lazy val stdcore = (project in file("W:\\scala\\eclipse\\ScalaStructuredDocument\\src")) lazy val sdttools = (project in file("W:\\scala\\eclipse\\SdtTools\\src")) // added <-` Running it results in this: `W:\scala\eclipse\play-eclipse>activator run W:\scala\eclipse\play-eclipse\build.sbt:7: error: not found: value sdtcore .dependsOn(sdtcore) // added` – slaursen Mar 30 '16 at 20:22