I want to use sbt to publish my project.
I'm used to maven, and need some help (mentally) transitioning.
By default I see 'publish' depends on 'package', but 'package' does not depend on 'test'. Of course I only want to publish tested code. How should I ensure this?
Of course I could make package depend on test, but the fact that this is not the default sort of suggests this is not idiomatic use of sbt. What would be the 'right' way to achieve this?
How do I find out more about best practices?
I am always running sbt clean test publish-local publish
(or publish-signed
). This ensures any error that occurs before publish
halts the process.
Another possibility would be to use the sbt-release plugin. This runs tests and also watches and adjusts your version strings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With