title: Project can't access dependencies in Play mulit-module project?
body: <p>I've been trying to separate my Play project into modules. I was following <a href="https://github.com/ornicar/lila/blob/master/project/BuildSettings.scala" rel="nofollow">this example BuildSettings.scala build file</a>. It was going well -- everything compiled and I had working tests.</p>
  
  <p>After I rewrote one of my controllers in the main project to use the services from the modules I started getting tons of errors.</p>
  
  <p>Play can't seem to find some dependencies. I'm getting this error</p>
  
  <pre><code>object ws is not a member of package play.api.libs 
  import play.api.libs.ws.WS
  </code></pre>
  
  <p>When I go to that file, it's able to find <code>play.libs.WS</code>, but not <code>play.api.libs.ws.WS</code>.</p>
  
  <p>My <strong>Build.scala</strong> is as follows:</p>
  
  <pre><code>val srcMain = Seq(
     scalaSource in Compile &lt;&lt;= (sourceDirectory in Compile)(identity),
     javaSource in Compile &lt;&lt;= (sourceDirectory in Compile)(identity),
     resourceDirectory in Compile &lt;&lt;= (sourceDirectory / "conf")(identity),
     scalaSource in Test &lt;&lt;= (sourceDirectory in Test)(identity),
     parallelExecution in Test := false
   )
  
  lazy val modules = Seq(mod)
  
  def projectToRef(p: Project): ProjectReference = LocalProject(p.id)
  
  lazy val moduleRefs = modules map projectToRef
  
  lazy val mod = Project("mod", file("modules/mod"), settings = buildSettings ++ srcMain)
     .settings(
       libraryDependencies ++= Seq(
         /* Some dependencies */
       )
     )
  
  lazy val main = play.Project(appName, appVersion, appDependencies, settings = Resolvers.all)
    .dependsOn(api)
  
  lazy val api = Project("api", file("modules/api"), settings = buildSettings ++ srcMain).settings(
      libraryDependencies ++= Seq(
        cache, apache
      )
    ) aggregate (moduleRefs: _*)
  
  override def rootProject = Some(main)
  </code></pre>
  
  <p>The <strong>project/plugins.sbt</strong> looks like this</p>
  
  <pre><code>// The Typesafe repository
  resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
  
  resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
  
  // Use the Play sbt plugin for Play projects
  addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3" exclude("org.apache.commons", "commons-lang3"))
  
  addSbtPlugin("com.typesafe.sbt" % "sbt-atmos-play" % "0.3.2")
  </code></pre>