Idiomatic use of sbt for issuing (testing) artifacts

I want to use sbt to publish my project.

I am used to maven and need some help (mentally).

By default, I see that "publication" depends on the "package", but the "package" does not depend on the "test". Of course, I only want to publish the verified code. How should I provide this?

Of course, I could depend on the test depending on the test , but the fact that this is not a default sort suggests that this is not an idiomatic use of sbt. What would be the โ€œrightโ€ way to achieve this?

How to learn more about best practices?

+5
source share
1 answer

I always work sbt clean test publish-local publish (or publish-signed ). This provides any error that occurs before publish stops the process.

Another possibility is to use the sbt-release plugin. This runs tests, and also tracks and corrects version lines.

+5
source

All Articles