title: Why does Play port not get started with library subproject?
body: <p>In <code>build.sbt</code> I have the lines like:</p>
  
  <pre><code>lazy val sparkCommon = (project in file("spark-common"))//.enablePlugins(PlayScala)
  
  lazy val root = (project in file(".")).enablePlugins(PlayScala)
                    .dependsOn(sparkCommon).aggregate(sparkCommon)
  </code></pre>
  
  <p>In <code>spark-common</code> project I have code in <code>src/main/scala/SimpleApp.scala</code>:</p>
  
  <pre><code> object SimpleApp {
      def getStr = "{ name = 'adf'}"
   }
  </code></pre>
  
  <p>In my Spark project <code>root</code> I am trying to use that code.</p>
  
  <p>With the <code>build.sbt</code> file above port listening is not started and I cannot access my service (but it compiles projects successfully, can make both packages and publish them to repo).</p>
  
  <p>If I uncomment line <code>enablePlugins(PlayScala)</code> for my library <code>spark-common</code> project in the <code>build.sbt</code> file, it does not see <code>SimpleApp</code> (as I understand Play projects have a bit different structure, thus compilation error is reasonable, as code located under <code>/spark-common/src/main/scala/SimleApp.scala</code>).</p>
  
  <p>It seems that I follow <a href="https://groups.google.com/forum/#!searchin/play-framework/2.3$20playscala$20/play-framework/lnEcyiPewn0/z49BVJD1Z60J" rel="nofollow">guideline </a> (I use Play 2.3.4), but it does not work. What can be an issue?</p>
  
  <p>activator run / sbt run command result:</p>
  
  <pre><code>[info] Done updating.
  
  SLF4J: Class path contains multiple SLF4J bindings.
  SLF4J: Found binding in [jar:file:/C:/Users/tkacheni/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.7.5.jar!/o
  rg/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: Found binding in [jar:file:/C:/Users/tkacheni/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1
  .1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
  --- (Running the application from SBT, auto-reloading is enabled) ---
  
  log4j:WARN No appenders could be found for logger (org.jboss.netty.channel.socket.nio.SelectorUtil).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  
  (Server started, use Ctrl+D to stop and go back to the console...)
  </code></pre>
  
  <p>Projects command results:</p>
  
  <pre><code>[rest-service] $ projects
  [info] In file:/C:/Git/rest-service/
  [info]   * root
  [info]     sparkCommon
  [rest-service] $
  </code></pre>
  
  <p>If I run last run I can see such an error:</p>
  
  <pre><code>java.lang.RuntimeException: No main class detected.
          at scala.sys.package$.error(package.scala:27)
          ...
  </code></pre>
  
  <p>I have found a similar issue in <a href="https://groups.google.com/forum/#!searchin/play-framework/2.3$20playscala$20/play-framework/lnEcyiPewn0/z49BVJD1Z60J" rel="nofollow">Google groups</a>, but it doesn't help me</p>