kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: findbugs should generate XML reports in Jenkins
Date Fri, 21 Apr 2017 10:39:20 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk d18de0e95 -> d53e99736


MINOR: findbugs should generate XML reports in Jenkins

Author: Colin P. Mccabe <cmccabe@confluent.io>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #2842 from cmccabe/findbugs-xml


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/d53e9973
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/d53e9973
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/d53e9973

Branch: refs/heads/trunk
Commit: d53e99736550b37edc89d1a220cab43604fa3f03
Parents: d18de0e
Author: Colin P. Mccabe <cmccabe@confluent.io>
Authored: Fri Apr 21 11:29:22 2017 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Fri Apr 21 11:35:49 2017 +0100

----------------------------------------------------------------------
 README.md    | 15 ++++++++-------
 build.gradle |  4 ++--
 jenkins.sh   |  2 +-
 3 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/d53e9973/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 64d5f3c..5deac72 100644
--- a/README.md
+++ b/README.md
@@ -156,17 +156,18 @@ You can run findbugs using:
     ./gradlew findbugsMain findbugsTest -x test
 
 The findbugs warnings will be found in `reports/findbugs/main.html` and `reports/findbugs/test.html`
files in the subproject build
-directories. Currently, findbugs warnings do not cause the build to fail.
+directories.  Use -PxmlFindBugsReport=true to generate an XML report instead of an HTML one.
 
 ### Common build options ###
 
-The following options should be set with a `-D` switch, for example `./gradlew -Dorg.gradle.project.maxParallelForks=1
test`.
+The following options should be set with a `-P` switch, for example `./gradlew -PmaxParallelForks=1
test`.
 
-* `org.gradle.project.mavenUrl`: sets the URL of the maven deployment repository (`file://path/to/repo`
can be used to point to a local repository).
-* `org.gradle.project.maxParallelForks`: limits the maximum number of processes for each
task.
-* `org.gradle.project.showStandardStreams`: shows standard out and standard error of the
test JVM(s) on the console.
-* `org.gradle.project.skipSigning`: skips signing of artifacts.
-* `org.gradle.project.testLoggingEvents`: unit test events to be logged, separated by comma.
For example `./gradlew -Dorg.gradle.project.testLoggingEvents=started,passed,skipped,failed
test`
+* `mavenUrl`: sets the URL of the maven deployment repository (`file://path/to/repo` can
be used to point to a local repository).
+* `maxParallelForks`: limits the maximum number of processes for each task.
+* `showStandardStreams`: shows standard out and standard error of the test JVM(s) on the
console.
+* `skipSigning`: skips signing of artifacts.
+* `testLoggingEvents`: unit test events to be logged, separated by comma. For example `./gradlew
-PtestLoggingEvents=started,passed,skipped,failed test`.
+* `xmlFindBugsReport`: enable XML reports for findBugs. This also disables HTML reports as
only one can be enabled at a time.
 
 ### Running in Vagrant ###
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/d53e9973/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index d8eab9a..394baf6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -327,8 +327,8 @@ subprojects {
 
   tasks.withType(FindBugs) {
     reports {
-      xml.enabled false
-      html.enabled true
+      xml.enabled (project.hasProperty('xmlFindBugsReport'))
+      html.enabled (!project.hasProperty('xmlFindBugsReport'))
     }
   }
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/d53e9973/jenkins.sh
----------------------------------------------------------------------
diff --git a/jenkins.sh b/jenkins.sh
index 369c865..faeb2b2 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -17,4 +17,4 @@
 # This script is used for verifying changes in Jenkins. In order to provide faster feedback,
the tasks are ordered so
 # that faster tasks are executed in every module before slower tasks (if possible). For example,
the unit tests for all
 # the modules are executed before the integration tests.
-./gradlew clean compileJava compileScala compileTestJava compileTestScala checkstyleMain
checkstyleTest findbugsMain unitTest integrationTest --no-daemon -Dorg.gradle.project.testLoggingEvents=started,passed,skipped,failed
"$@"
+./gradlew clean compileJava compileScala compileTestJava compileTestScala checkstyleMain
checkstyleTest findbugsMain unitTest integrationTest --no-daemon -PxmlFindBugsReport=true
-PtestLoggingEvents=started,passed,skipped,failed "$@"


Mime
View raw message