title: excluding dependency signature files in JAR file using build.sbt in IntelliJ
body: <p>I am having an issue similar to <a href="https://stackoverflow.com/questions/34855649/invalid-signature-file-digest-for-manifest-main-attributes-exception-while-tryin">Invalid signature file digest for Manifest main attributes exception while trying to run jar file</a> but cannot get this or a number of other fixes to work using build.sbt and building the artifacts from IntelliJ 2018.1</p>
  
  <p>The project was started in IntelliJ as a scala>sbt project
  Java version is 1.8.0_77</p>
  
  <p>My build.sbt contains:</p>
  
  <pre><code>scalaVersion := "2.11.8"
  
  libraryDependencies ++= Seq(
    "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
    "org.scalatest" %% "scalatest" % "3.0.5" % "test",
    "org.apache.spark" % "spark-core_2.11" % "2.3.0",
    "org.apache.spark" % "spark-sql_2.11" % "2.3.0",
    "com.amazonaws" % "aws-java-sdk" % "1.7.4",
    "org.apache.hadoop" % "hadoop-aws" % "2.7.1"
  )
  
  excludeFilter in Compile := "*.SF" || "*.DSA" || "*.RSA"
  </code></pre>
  
  <p>The project builds without any error and runs fine in IntelliJ but when I Build> Build Artifacts and run the resulting jar from the command-line on the same machine as IntelliJ is running on:</p>
  
  <p>java -jar myApp.jar</p>
  
  <p>I get: </p>
  
  <p>Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes</p>