Reputation: 1404
I am aware of publishing sbt build
but what if I want to publish only documentation generated using sbt doc
.
Is there anyway if we don't want to publish scala code as a library, while just want to publish documentation?
To make it more clear. I want to host API documentation of sbt same as we do with the library using sbt publish
.
Upvotes: 1
Views: 442
Reputation: 6460
The right solution depends on how you want to consume this documentation later.
If you want to host it as a website, you should probably take a look at sbt-site and other related plugins.
If you want to publish it as an artifact, same way as it happens with sbt publish
by default, just without jar and sources, you can just add this to your build.sbt
:
Compile / packageBin / publishArtifact := false
Compile / packageSrc / publishArtifact := false
This will publish only the -javadoc.jar
, the ivy-xml and the pom-file (or no pom, if you add publishMavenStyle := false
).
You can check sbt documentation for these options in the Artifacts section.
Upvotes: 2