From c8842a060351a6b37c00fd09e4390f990f810b07 Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Fri, 15 May 2015 11:19:17 +0900 Subject: [PATCH] Added findbugs and jacoco (coverage report) settings --- README.md | 4 +++- build.sbt | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7533eb4..99917d6 100755 --- a/README.md +++ b/README.md @@ -165,7 +165,9 @@ snappy-java uses sbt (simple build tool for Scala) as a build tool. Here is a si > ~test-only * # run tests that matches a given name pattern > publishM2 # publish jar to $HOME/.m2/repository > package # create jar file - + > findbugs # Produce findbugs report in target/findbugs + > jacoco:cover # Report the code coverage of tests to target/jacoco folder + For the details of sbt usage, see my blog post: [Building Java Projects with sbt](http://xerial.org/blog/2014/03/24/sbt/) ## Miscellaneous Notes diff --git a/build.sbt b/build.sbt index 955ddea..3fc24f5 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,4 @@ +import de.johoop.findbugs4sbt.ReportType name := "snappy-java" @@ -68,6 +69,14 @@ logBuffered in Test := false incOptions := incOptions.value.withNameHashing(true) +findbugsSettings + +findbugsReportType := Some(ReportType.FancyHtml) + +findbugsReportPath := Some(crossTarget.value / "findbugs" / "report.html") + +jacoco.settings + libraryDependencies ++= Seq( "junit" % "junit" % "4.8.2" % "test", "org.codehaus.plexus" % "plexus-classworlds" % "2.4" % "test",