How to remove an artifact from a publication

For publishing, I use sbt-assembly, but the problem is that on publish it publishes all artifacts that I don’t need, and I'm only what is generated using the build task. How to remove artifacts from packagedArtifacts ?

+4
source share
1 answer

If you just want to remove all artifacts from the publish task, do it manually:

 packagedArtifacts := Map.empty 

Then call addArtifact with the Artifact assembly:

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

Now, if you call show packagedArtifacts , you will only see the assembly artifact

+3
source

Source: https://habr.com/ru/post/1500127/


All Articles