title: scala multi sbt project: object is not a member of package, not found type
body: <p>How do I import class <code>abc</code> from project <code>main</code> to be used by another class in project <code>web</code> in a <code>multi-project sbt</code> configuration?</p>
  
  <p>Upon <code>sbt compile</code> I get:<br>
  <code>object abc is not a member of package com</code>
  <code>not found: type abc</code></p>
  
  <p>While compilation from within IntelliJ is successful.</p>
  
  <p><strong>build.sbt</strong></p>
  
  <pre><code>lazy val main = project.in(file("main"))
    .settings(commonSettings: _*)
  
  lazy val web = project.in(file("web"))
    .settings(commonSettings: _*)
    .enablePlugins(PlayScala)
    .dependsOn(main)
  
  lazy val root = (project in file("."))
    .dependsOn(web, main)
    .aggregate(web, main)
    .settings(commonSettings: _*)
  
  
  mainClass in root in Compile := (mainClass in web in Compile).value
  
  fullClasspath in web in Runtime ++= (fullClasspath in main in Runtime).value
  
  fullClasspath in root in Runtime ++= (fullClasspath in web in Runtime).value
  </code></pre>
  
  <p>Inside <strong>web project</strong>:</p>
  
  <pre><code>package com.company.web.controllers
  import _root_.com.company.main.abc // also tried without root. 
  // Intellij recognizes the import successuflly
  
  class Posts @Inject() (repo : abc) extends Controller { ..
  </code></pre>
  
  <p>Inside <strong>main project</strong>:</p>
  
  <pre><code>package com.company.main
  class abc @Inject() (){
  </code></pre>
  
  <p>What could be wrong?
  Thanks.</p>