Search code examples
scalasbtsbt-assembly

SBT: How to exclude source files and documentation from the assembly?


I am using the plain assembly plugin with SBT but along with the assembled package, I get extra packages like:

mypackage_2.11.jar
mypackage_2.11-javadoc.jar
mypackage_2.11.-sourcesjar

Is there any way to skip those packages with SBT?


Solution

  • This should disable the generation of these JARs (see http://www.scala-sbt.org/0.13/docs/Detailed-Topics/Artifacts.html):

    publishArtifact in (Compile, packageBin) := false
    
    publishArtifact in (Compile, packageDoc) := false
    
    publishArtifact in (Compile, packageSrc) := false