An opinionated wrapper and convenience classes for providing a scala-ified dropwizard setup.
To add Dropwizard Scala to your project with sbt, add the following lines to
your build.sbt
:
resolvers += "OJO Snapshots" at "https://oss.jfrog.org/oss-snapshot-local/",
// resolvers += "OJO Releases" at "https://oss.jfrog.org/oss-release-local/"
libraryDependencies += "uk.gov.gds" %% "dropwizard-scala" % "1.0.0-SNAPSHOT"
Dropwizard Scala adds a number of new Dropwizard health checks you may find useful for your project, including:
The build info health check displays the implementation version of the local manifest as the build number.
To use simply pass in the Package object of your micro-service class:
healthChecks(
environment,
List(
new BuildInfoHealthCheck(getClass.getPackage)
)
)
You can customise the implementation version of manifests generated by SBT by
adding something like the following to your build.sbt
file:
import sbt.Package.ManifestAttributes
packageOptions := Seq(ManifestAttributes(("Implementation-Version", "BUILDNUMBER")))
Ensure the following credentials at ~/.ivy2/.credentials
:
realm=Artifactory Realm
host=oss.jfrog.org
user=gds
password=<revoked>
Then in your local Dropwizard Scala folder execute the following
sbt publish
Note Be careful what plugins you have installed in your .sbt/0.13/plugins.sbt
or .sbt/plugins.sbt
files as these can be included as dependencies in the
generated POM.