philippus / sbt-jackson-version-check   0.0.2

Apache License 2.0 GitHub

🎃 Check if the Jackson modules match in your sbt project

Scala versions: 2.12
sbt plugins: 1.x

sbt-jackson-version-check

build Current Version Scala Steward badge License

This plugin can verify that the Jackson module versions of a project match. This check can run before running any (integration) tests or running your application in production, thereby avoiding runtime surprises. You can use it also as part of your build chain and make the build fail if non-matching versions are found.

According to the Jackson documentation extension modules are ONLY guaranteed to work with core components that have the same minor version, see https://github.com/FasterXML/jackson/wiki/Jackson-Releases#internal-api-versioning. Jackson-module-scala will always throw an exception if the major and minor versions do not match with jackson-databind's versions, see https://github.com/FasterXML/jackson-module-scala/blob/9735bcb5b0abd17453fa4aa9f1eef5889467fbf7/src/main/scala/com/fasterxml/jackson/module/scala/JacksonModule.scala#L61.

Installation

sbt-jackson-version-check is published for sbt 1.10.5 and above. To start using it add the following to your plugins.sbt:

addSbtPlugin("nl.gn0s1s" % "sbt-jackson-version-check" % "0.0.2")

Usage

Tasks

Task Description Command
jacksonVersionCheck Runs version check. $ sbt jacksonVersionCheck

Configuration

You can configure the configuration in your build.sbt file.

Setting Description Default Value
jacksonVersionCheckFailBuildOnNonMatchingVersions Sets whether non-matching versions fail the build, if false non-matching versions show up as warnings in the log, if true they show up as errors. false
jacksonVersionCheckStrict Sets whether Jackson modules versions should match exactly, including the patch version. Otherwise only the major and minor versions should match. false

License

The code is available under the Apache 2.0 License.