7

Trying to compile a project containing Play Framework as a subproject I receive this error:

~/my-project/web/build.sbt:8: error: not found: value PlayScala
lazy val `web` = (project in file(".")).enablePlugins(PlayScala)

build.sbt

name := "my-project"

version := "1.0"

scalaVersion := "2.11.5"

lazy val `my-project` = (project in file("."))
  .aggregate( web)

lazy val web = project

plugins.sbt

logLevel := Level.Warn

web/build.sbt

name := "web"

version := "1.0"


scalaVersion := "2.11.1"

lazy val `web` = (project in file(".")).enablePlugins(PlayScala)

libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"

libraryDependencies ++= Seq( jdbc , anorm , cache , ws )

unmanagedResourceDirectories in Test <+=  baseDirectory ( _ /"target/web/public/test" ) 

web/project/plugins.sbt

logLevel := Level.Warn

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

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.7")

The error goes away when I copy web/project/plugins.sbt to project/plugins.sbt

This is not what I want since web is a subproject and PlayScala is a dependency of the subproject alone.

BAR
  • 15,909
  • 27
  • 97
  • 185
  • @JustinPihony seems that it is the same issue. However we are 9 months into it, and SBT is still pre 1.0 so many changes are occurring and it is possible there is now a fix. I do not see that subproject's plugins are ignored in SBT docs, so there is hope... – BAR Jan 29 '15 at 19:52
  • And as they say in the linked post, it is an architectural issue, and if not already fixed I will join the dev group to tell them and bounce ideas as to why not allow it. – BAR Jan 29 '15 at 19:54
  • 1
    The situation on subproject/project dir has not changed. (I am one of the devs) – Eugene Yokota Jan 29 '15 at 20:02
  • @EugeneYokota Thanks for the info Eugene, is this something in progress? Do you agree it is an architectural issue, or do you have some reasoning? I would imagine its not too difficult to implement... Maybe I will take a whack at it if you are open to the idea. – BAR Jan 29 '15 at 20:04
  • @BAR We can discuss more on sbt-dev, but I personally don't see it as a big issue or high enough priority at this point for (paid) core developers to pursue. Our current goal is to work on sbt server, which should enable many interesting things down the road, and then stabilize each modules towards 1.0. – Eugene Yokota Jan 30 '15 at 04:29
  • @EugeneYokota I am looking forward to the new server features and v1.0. Will join sbt-dev so we may discuss in detail. – BAR Jan 30 '15 at 15:07
  • 3
    still not fixed :( and still a pain in multi-project builds – Grozz Jul 11 '15 at 08:17

0 Answers0