4

For publishing i'm using sbt-assembly, but the problem is that on publish it publishes all artifacts, which i don't need, i what just the one which is generated with assembly task. How can i remove artifacts from packagedArtifacts setting?

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319

1 Answers1

3

If you simply want to remove all the artifacts from the publish task then do it manually:

packagedArtifacts := Map.empty

Then call addArtifact with assembly Artifact:

artifact in (Compile, assembly) ~= { art =>
  art.copy(`classifier` = Some("assembly"))
}

Now if you call show packagedArtifacts, you'll see only assembly artifact

4lex1v
  • 21,367
  • 6
  • 52
  • 86