title: sbt assembly works, but still "no main manifest attribute"
body: <p>I am using sbt 1.0.2. My build.sbt is</p>
  
  <pre><code>name := "myprogram"
  
  version := "0.1"
  
  scalaVersion := "2.12.3"
  
  libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"
  
  // https://mvnrepository.com/artifact/net.sf.py4j/py4j
  libraryDependencies += "net.sf.py4j" % "py4j" % "0.10.6"
  
  scalacOptions ++= Seq(
    "-unchecked",
    "-deprecation",
    "-feature",
    "-encoding", "UTF-8",
    "-Xfuture",
    "-Xlint:unsound-match",      // Pattern match may not be typesafe.
    "-Yno-adapted-args",         // Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver.
    "-Ypartial-unification",     // Enable partial unification in type constructor inference
    "-Ywarn-dead-code",          // Warn when dead code is identified.
    "-Ywarn-inaccessible",       // Warn about inaccessible types in method signatures.
    "-Ywarn-infer-any",          // Warn when a type argument is inferred to be `Any`.
    "-Ywarn-nullary-override",   // Warn when non-nullary `def f()' overrides nullary `def f'.
    "-Ywarn-nullary-unit",       // Warn when nullary methods return Unit.
    "-Ywarn-unused",             // Warn if a method or value is unused.
    "-Ywarn-unused:implicits",   // Warn if an implicit parameter is unused.
    "-Ywarn-unused:imports",     // Warn if an import selector is not referenced.
    "-Ywarn-unused:locals",      // Warn if a local definition is unused.
    "-Ywarn-unused:params",      // Warn if a value parameter is unused.
    "-Ywarn-unused:patvars",     // Warn if a variable bound in a pattern is unused.
    "-Ywarn-unused:privates",    // Warn if a private member is unused.
    "-Ywarn-value-discard"       // Warn when non-Unit expression results are unused.
  )
  
  javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
  
  test in assembly := {}
  assemblyJarName in assembly := "myprogram.jar"
  
  exportJars := true
  
  mainClass in Compile := Some("com.company.MyClass")
  mainClass in assembly := Some("com.company.MyClass")
  mainClass in(Compile, run) := Some("com.company.MyClass")
  mainClass in(Compile, packageBin) := Some("com.company.MyClass")
  </code></pre>
  
  <p>and it seems to compile ok with <code>sbt assembly</code>, where some of the output is</p>
  
  <pre><code>[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
  [info] Including: py4j-0.10.6.jar
  [info] Including: scala-library.jar
  [info] Checking every *.class/*.jar file's SHA-1.
  [info] Merging files...
  [warn] Merging 'META-INF/MANIFEST.MF' with strategy 'discard'
  [warn] Merging 'META-INF/maven/net.sf.py4j/py4j/pom.properties' with strategy 'discard'
  [warn] Merging 'META-INF/maven/net.sf.py4j/py4j/pom.xml' with strategy 'discard'
  [warn] Strategy 'discard' was applied to 3 files
  </code></pre>
  
  <p>Once I go into command line I get</p>
  
  <pre><code>$ java -jar myprogram.jar
  no main manifest attribute, in myprogram.jar
  </code></pre>
  
  <p>I opened up my jar and looked at <code>MANIFEST.MF</code> and could not find the main there:</p>
  
  <pre><code>Manifest-Version: 1.0
  Implementation-Title: myprogram
  Implementation-Version: 0.1
  Specification-Vendor: default
  Specification-Title: myprogram
  Implementation-Vendor-Id: default
  Specification-Version: 0.1
  Implementation-Vendor: default
  </code></pre>
  
  <p>It might be worth mentioning that my program is mainly in Scala, except for my main class which is in Java.</p>
  
  <p>What do I have to change?</p>