title: SBT sub-project inter-dependencies
body: <p>Where have I gone wrong with this SBT project configuration?</p>
  
  <p>I have a parent project A, with subprojects B1 and B2, and B2 depends on project B1.</p>
  
  <p>B1 compiles successfully; but B2's compilation fails because it cannot find B1's classes.</p>
  
  <pre><code>import sbt._
  
  class A(info: ProjectInfo) extends ParentProject(info) with IdeaProject {
    lazy val B1 = project("b1", "B1", new B1(_))
    lazy val B2 = project("b2", "B2", new B2(_))
  
    class B1(info: ProjectInfo) extends DefaultWebProject(info) with IdeaProject {
      override def unmanagedClasspath = super.unmanagedClasspath +++ extraJars
      def baseDirectory = "lib"
      def extraJars = descendents(baseDirectory, "*.jar")
    }
  
    class B2(info: ProjectInfo) extends DefaultProject(info) with IdeaProject {
      override def deliverProjectDependencies = 
        B1.projectID :: super.deliverProjectDependencies.toList
    }
  }
  </code></pre>
  
  <p>I'm really not sure if I've defined the dependency between B2 and B1 correctly. I would have specified it using the project method with this signature:</p>
  
  <pre><code>def project(path: Path, name: String, deps: Project*): Project
  </code></pre>
  
  <p>... but I need the subprojects to mix in the IdeaProject trait.</p>