I used the Gitter Play Scala Seed template to create a starter project.
I later decided to add another one of my projects as a sub-project to this one by following these and these instructions. However, even though I added the sub-project folder and referred to it from my build.sbt
file, whenever I run update
(or any of its dependencies) I am getting an error saying that the sub-project cannot be found.
Here's the build.sbt
which I am using in the play project (my base project) folder:
name := """play-scala-starter-example"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.aggregate(lettergenerator)
.dependsOn(lettergenerator)
// I have also tried it explicitly:
// lazy val lettergenerator = (project in file("lettergenerator"))
lazy val lettergenerator = project
resolvers += Resolver.sonatypeRepo("snapshots")
scalaVersion := "2.12.2"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "3.0.0" % Test
libraryDependencies += "com.h2database" % "h2" % "1.4.194"
This is my folder structure:
play-scala-starter-example
├ app
├ build.sbt
├ conf
├ lettergenerator
│ ├ build.sbt
│ ├ LICENSE
│ ├ project
│ ├ README.md
│ ├ src
│ └ TODO.md
├ LICENSE
├ logs
├ project
├ public
├ README.md
├ target
└ test
Here's the stack trace from the error:
[info] Loading global plugins from /home/claudiusbr/.sbt/0.13/plugins
[info] Loading project definition from /home/claudiusbr/test/play-scala-starter-example/project
java.lang.RuntimeException: No project 'lettergenerator' in 'file:/home/claudiusbr/test/play-scala-starter-example/'.
Valid project IDs: root
at scala.sys.package$.error(package.scala:27)
at sbt.Load$$anonfun$checkAll$2$$anonfun$apply$16.apply(Load.scala:401)
at sbt.Load$$anonfun$checkAll$2$$anonfun$apply$16.apply(Load.scala:396)
at scala.collection.immutable.List.foreach(List.scala:318)
at sbt.Load$$anonfun$checkAll$2.apply(Load.scala:396)
at sbt.Load$$anonfun$checkAll$2.apply(Load.scala:396)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
at scala.collection.immutable.Map$Map1.foreach(Map.scala:109)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
at sbt.Load$.checkAll(Load.scala:396)
at sbt.Load$.loadURI(Load.scala:321)
at sbt.Load$.load(Load.scala:316)
at sbt.Load$.load(Load.scala:305)
at sbt.Load$$anonfun$4.apply(Load.scala:146)
at sbt.Load$$anonfun$4.apply(Load.scala:146)
at sbt.Load$.timed(Load.scala:1025)
at sbt.Load$.apply(Load.scala:146)
at sbt.Load$.defaultLoad(Load.scala:39)
at sbt.BuiltinCommands$.liftedTree1$1(Main.scala:548)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:548)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:540)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:540)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:59)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:59)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
at sbt.Command$.process(Command.scala:93)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:96)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:96)
at sbt.State$$anon$1.doX$1(State.scala:183)
at sbt.State$$anon$1.process(State.scala:190)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:96)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:96)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:96)
at sbt.MainLoop$.run(MainLoop.scala:89)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:68)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:63)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:63)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:46)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:30)
at sbt.MainLoop$.runLogged(MainLoop.scala:22)
at sbt.StandardMain$.runManaged(Main.scala:109)
at sbt.xMain.run(Main.scala:38)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
[error] No project 'lettergenerator' in 'file:/home/claudiusbr/test/play-scala-starter-example/'.
[error] Valid project IDs: root
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
I have tried looking at what seems to be a similar question for a different error, but nothing I can see there seems to help with my issue.
I am using sbt
version 0.13.16
and Scala 2.12.3
for my lettergenerator
, but I tried respectively both these and 0.13.15
/2.12.2
for my play
project's build.sbt
and neither worked.
It's possible I am missing something obvious, but so far I am not sure what else I could do, so would appreciate any assistance.