title: SBT won't pick the specified mainClass
body: <p>I wrote this scala code</p>
  
  <pre><code>package com.abhi
  
  import java.io.File
  
  object Main1 {
      def main(args: Array[String]) : Unit = {
          println("Main1 Hello World")
      }
  }
  
  object Main2 {
      def main(args: Array[String]) : Unit = {
          println("Main2 Hello World")
      }
  }
  </code></pre>
  
  <p>and this built.sbt file</p>
  
  <pre><code>name := "Foo"
  
  version := "1.0"
  
  scalaVersion := "2.11.6"
  
  libraryDependencies ++= Seq(
      "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test"   
  )
  
  mainClass:= Some("com.abhi.Main1")
  </code></pre>
  
  <p>But when I run <code>sbt run</code> it still says </p>
  
  <pre><code>[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
  
  Multiple main classes detected, select one to run:
  
   [1] com.abhi.Main1
   [2] com.abhi.Main2
  
  Enter number: 
  </code></pre>
  
  <p>Why is it still asking me for which class to chose? The main class to choose was already specified in the build.sb</p>