I have the below build.sbt. I am using sbt 0.13.9.
name := "myproject"
organization := "myproject"
version := "0.1"
lazy val myproject = project in file(".") aggregate(common, myservice)
lazy val common = (project in file("common"))
.settings(commonSettings: _*)
lazy val myservice = (project in file("myservice")) dependsOn(common)
lazy val commonSettings = Seq(
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8"),
scalaVersion := "2.11.7",
resolvers ++= Seq("Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/")
)
When I run sbt compile
it fails with the below error:
[warn] module not found: common#common_2.10;0.1-SNAPSHOT
[warn] ==== local: tried
[warn] /home/priyar/.ivy2/local/common/common_2.10/0.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/common/common_2.10/0.1-SNAPSHOT/common_2.10-0.1-SNAPSHOT.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: common#common_2.10;0.1-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
If I remove line 10 (.settings(commonSettings: _*)) it runs fine. But I need that line.
I copied the idea from https://github.com/theiterators/reactive-microservices/blob/master/build.sbt
What am I doing wrong?