Why is the multi-project build.sbt failing?

Skip to first unread message

Priya R

Mar 3, 2016, 9:24:15 AM3/3/16
to simple-build-tool

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?

bigdatanag rao

Jul 7, 2016, 4:02:03 AM7/7/16
to simple-build-tool
Hi Priya,

I am also facing below issue. Please tell the fix if you get rid of this issue.
Reply all
Reply to author
0 new messages