kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Add property to configure showing of standard streams in Gradle
Date Fri, 08 Jan 2016 23:13:28 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 58def1cba -> 8d6748579


MINOR: Add property to configure showing of standard streams in Gradle

This is handy when debugging certain kinds of Jenkins failures.

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

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #739 from ijuma/gradle-show-standard-streams


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

Branch: refs/heads/trunk
Commit: 8d674857996667bce52a804feb6108a6903eb39b
Parents: 58def1c
Author: Ismael Juma <ismael@juma.me.uk>
Authored: Fri Jan 8 15:13:14 2016 -0800
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Fri Jan 8 15:13:14 2016 -0800

----------------------------------------------------------------------
 README.md    | 16 +++++++++++-----
 build.gradle | 20 ++++++++++++--------
 2 files changed, 23 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/8d674857/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 9dbafcc..6d27363 100644
--- a/README.md
+++ b/README.md
@@ -103,8 +103,8 @@ Please note for this to work you should create/update `~/.gradle/gradle.properti
     signing.password=
     signing.secretKeyRingFile=
 
-### Publishing the jars without signing to a local repository ###
-    ./gradlew -Dorg.gradle.project.skipSigning=true -Dorg.gradle.project.mavenUrl=file://path/to/repo
uploadArchivesAll
+### Installing the jars to the local Maven repository ###
+    ./gradlew installAll
 
 ### Building the test jar ###
     ./gradlew testJar
@@ -115,12 +115,18 @@ Please note for this to work you should create/update `~/.gradle/gradle.properti
 ### Running checkstyle on the java code ###
     ./gradlew checkstyleMain checkstyleTest
 
-### Limit the number of processes for each task ###
-    ./gradlew -Dorg.gradle.project.maxParallelForks=1 test
-
 This will most commonly be useful for automated builds where the full resources of the host
running the build and tests
 may not be dedicated to Kafka's build.
 
+### Common build options ###
+
+The following options should be set with a `-D` switch, for example `./gradlew -Dorg.gradle.project.maxParallelForms=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.
+
 ### Running in Vagrant ###
 
 See [vagrant/README.md](vagrant/README.md).

http://git-wip-us.apache.org/repos/asf/kafka/blob/8d674857/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 7be82e8..a481280 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,17 +47,20 @@ allprojects {
 }
 
 ext {
-    gradleVersion = "2.10"
-    buildVersionFileName = "kafka-version.properties"
+  gradleVersion = "2.10"
+  buildVersionFileName = "kafka-version.properties"
 
-    userMaxForks = project.hasProperty('maxParallelForks') ? maxParallelForks.toInteger()
: null
+  userMaxForks = project.hasProperty('maxParallelForks') ? maxParallelForks.toInteger() :
null
 
-    skipSigning = project.hasProperty('skipSigning') && skipSigning.toBoolean()
-    shouldSign = !skipSigning && !version.endsWith("SNAPSHOT") && project.gradle.startParameter.taskNames.any
{ it.contains("upload") }
+  skipSigning = project.hasProperty('skipSigning') && skipSigning.toBoolean()
+  shouldSign = !skipSigning && !version.endsWith("SNAPSHOT") && project.gradle.startParameter.taskNames.any
{ it.contains("upload") }
+
+  mavenUrl = project.hasProperty('mavenUrl') ? project.mavenUrl : ''
+  mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : ''
+  mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : ''
+
+  userShowStandardStreams = project.hasProperty("showStandardStreams") ? showStandardStreams
: null
 
-    mavenUrl = project.hasProperty('mavenUrl') ? project.mavenUrl : ''
-    mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : ''
-    mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : ''
 }
 
 apply from: file('wrapper.gradle')
@@ -134,6 +137,7 @@ subprojects {
     maxParallelForks = userMaxForks ?: Runtime.runtime.availableProcessors()
     testLogging {
       events "passed", "skipped", "failed"
+      showStandardStreams = userShowStandardStreams ?: false
       exceptionFormat = 'full'
     }
   }


Mime
View raw message