Commit Graph

66 Commits

Author SHA1 Message Date
Grant Henke 09f700ab3e KAFKA-1714: Fix gradle wrapper bootstrapping (#6031)
Given we need to follow the Apache rule of not checking
any binaries into the source code, Kafka has always had
a bit of a tricky Gradle bootstrap.
Using ./gradlew as users expect doesn’t work and a
local and compatible version of Gradle was required to
generate the wrapper first.

This patch changes the behavior of the wrapper task to
instead generate a gradlew script that can bootstrap the
jar itself. Additionally it adds a license, removes the bat
script, and handles retries.

The documentation in the readme was also updated.

Going forward patches that upgrade gradle should run
`gradle wrapper` before checking in the change.

With this change users using ./gradlew can be sure they
are always building with the correct version of Gradle.

Reviewers: Viktor Somogyi <viktorsomogyi@gmail.com>, Ismael Juma <ismael@juma.me.uk
2019-11-21 08:06:06 -08:00
Arvind Thirunarayanan 255fcdc236 MINOR: add dependency analysis debugging tasks
Author: Arvind Thirunarayanan <athirunar@confluent.io>

Reviewers: Colin Patrick McCabe <colin@cmccabe.xyz>

Closes #7694 from arvindth/ath-debugdeps-task
2019-11-16 14:38:35 +05:30
Dejan Stojadinović 5339d2dfd2 KAFKA-7197: Support Scala 2.13 (#5454)
- include Scala 2.13 in gradle build
- handle future milestone and RC versions of Scala in a better way
- if no Scala version is specified, default to scala 2.12 (bump from 2.11)
- include certain Xlint options (removed by Scala 2.13) for Scala 2.11/2.12 build only
- upgrade versions for dependencies: 
  - scalaLogging: 3.9.0 -->> 3.9.2
  - scalatest:        3.0.7 -->> 3.0.8
  - scoverage:       1.3.1 -->> 1.4.0

Reviewers: Ewen Cheslack-Postava <me@ewencp.org>, Ismael Juma <ismael@juma.me.uk>
2019-06-22 09:26:14 -07:00
Stanislav Kozlovski 9e60f4cd17 MINOR: Add system tests README link from main README (#6939) 2019-06-14 18:51:37 +05:30
Ismael Juma 7d9e93ac6d
MINOR: Use https instead of http in links (#6477)
Verified that the https links work.

I didn't update the license header in this PR since that touches
so many files. Will file a separate one for that.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2019-04-22 11:58:25 -07:00
Attila Sasvari 09c4a3e87d MINOR: Update README.md with Gradle 5+ requirement (#6039) 2018-12-17 16:30:14 -08:00
Colin Hicks 4a0fd4c41b MINOR: Bump Gradle version to 5.0 (#5964)
Gradle 5.0 was released on 26 November. See the release notes for enhancements and fixes: https://docs.gradle.org/5.0/release-notes.html.

A notable bugfix ensures that Javadoc artifacts are cleaned between builds.

The upgraded wrapper was spot-checked against the commands in the README and the
README was updated not to use removed system property `-Dtest.single`.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2018-11-29 16:04:39 -08:00
Ismael Juma b4722cc16f
KAFKA-7524: Recommend Scala 2.12 and use it for development (#5530)
Scala 2.12 has better support for newer Java versions and includes additional
compiler warnings that are helpful during development. In addition, Scala 2.11
hasn't been supported by the Scala community for a long time, the soon to be
released Spark 2.4.0 will finally support Scala 2.12 (this was the main reason
preventing many from upgrading to Scala 2.12) and Scala 2.13 is at the RC stage.
It's time to start recommending the Scala 2.12 build as we prepare support for
Scala 2.13 and start thinking about removing support for Scala 2.11.

In the meantime, Jenkins will continue to build all supported Scala versions (including
Scala 2.11) so the PR and trunk jobs will fail if people accidentally use methods
introduced in Scala 2.12.

Reviewers: Ewen Cheslack-Postava <me@ewencp.org>
2018-10-28 11:31:39 -07:00
Stanislav Kozlovski df35c22eac MINOR: Update minimum required Gradle version to 4.7 (#5642)
After commit f123d2f, the minimum required gradle version changed to 4.7

This is due to the use of isJava11Compatible() in build.gradle. It was
introduced in version 4.7 (https://github.com/gradle/gradle/blob/master/subprojects/base-services/src/main/java/org/gradle/api/JavaVersion.java#L172-L180)

Reviewers: Ismael Juma <ismael@juma.me.uk>
2018-09-13 07:38:53 -07:00
Ismael Juma f123d2f18c KAFKA-5887; Replace findBugs with spotBugs and upgrade to Gradle 4.10
findBugs is abandoned, it doesn't work with Java 9 and the Gradle plugin will be deprecated in
Gradle 5.0: https://github.com/gradle/gradle/pull/6664

spotBugs is actively maintained and it supports Java 8, 9 and 10. Java 11 is not supported yet,
but it's likely to happen soon.

Also fixed a file leak in Connect identified by spotbugs.

Manually tested spotBugsMain, jarAll and importing kafka in IntelliJ and running
a build in the IDE.

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

Reviewers: Colin Patrick McCabe <colin@cmccabe.xyz>, Dong Lin <lindong28@gmail.com>

Closes #5625 from ijuma/kafka-5887-spotbugs
2018-09-10 13:14:00 -07:00
Manikumar Reddy O 62ea10a5c1 MINOR: Update README to specify Gradle 4.6 as the minimum required version (#5606)
#5602 uses `annotationProcessor`, which was introduced in Gradle 4.6.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2018-09-04 05:29:50 -07:00
Ismael Juma e70a191d30
KAFKA-4423: Drop support for Java 7 (KIP-118) and update deps (#5046)
* Set --source, --target and --release to 1.8.
* Build Scala 2.12 by default.
* Remove some conditionals in the build file now that Java 8
is the minimum version.
* Bump the version of Jetty, Jersey and Checkstyle (the newer
versions require Java 8).
* Fixed issues uncovered by the new version if Checkstyle.
* A couple of minor updates to handle an incompatible source
change in the new version of Jetty.
* Add dependency to jersey-hk2 to fix failing tests caused
by Jersey upgrade.
* Update release script to use Java 8 and to take into account
that Scala 2.12 is now built by default.
* While we're at it, bump the version of Gradle, Gradle plugins,
ScalaLogging, JMH and apache directory api.
* Minor documentation updates including the readme and upgrade
notes. A number of Streams Java 7 examples can be removed
subsequently.
2018-05-21 23:17:42 -07:00
Matthias Wessendorf 43aaa7c363 KAFKA-5895: Gradle 3.0+ is needed on the build (#3861)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2017-12-22 01:52:12 +00:00
Ismael Juma 3e86161b84 MINOR: Update to Scala 2.11.12 (part 2)
Missed a few places in the previous commit.

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

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>

Closes #4200 from ijuma/scala-2.11.12-part2
2017-11-09 18:24:48 +00:00
Guozhang Wang d2774e302f KAFKA-5727: Add Streams quickstart tutorial as an archetype project
0. Minor fixes on the existing examples to merge all on a single input topic; also do not use `common.utils.Exit` as it is for internal usage only.

1. Add the archetype project for the quickstart. Steps to try it out:

  a. `mvn install` on the quickstart directory.
  b. `mvn archetype:generate \
-DarchetypeGroupId=org.apache.kafka \
-DarchetypeArtifactId=streams-quickstart-java \
-DarchetypeVersion=1.0.0-SNAPSHOT \
-DgroupId=streams-quickstart \
-DartifactId=streams-quickstart \
-Dversion=0.1 \
-Dpackage=StreamsQuickstart \
-DinteractiveMode=false` at any directory to create the project.
  c. build the streams jar with version `1.0.0-SNAPSHOT` to local maven repository with `./gradlew installAll`; `cd streams-quickstart; mvn clean package`
  d. create the input / output topics, start the console producer and consumer.
  e. start the program: `mvn exec:java -Dexec.mainClass=StreamsQuickstart.Pipe/LineSplit/WordCount`.
  f. type data on console producer and observe data on console consumer.

Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Damian Guy <damian.guy@gmail.com>, Bill Bejeck <bbejeck@gmail.com>, Ewen Cheslack-Postava <me@ewencp.org>, Eno Thereska <eno.thereska@gmail.com>

Closes #3630 from guozhangwang/KMinor-streams-quickstart-tutorial
2017-08-11 12:19:28 -07:00
Max Zheng 613971f8d4 MINOR: Use commitId property if set
This allows a build system to set the correct commit ID when .git/HEAD would be wrong
if there are local commits for build purposes.

Author: Max Zheng <mzheng@confluent.io>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #3606 from maxzheng/read-commit@trunk
2017-08-03 15:24:05 -07:00
Ismael Juma bcf447e93e KAFKA-4422; Drop support for Scala 2.10 (KIP-119)
Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Ewen Cheslack-Postava <me@ewencp.org>

Closes #2956 from ijuma/kafka-4422-drop-support-scala-2.10
2017-05-11 08:08:11 +01:00
Colin P. Mccabe d53e997365 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
2017-04-21 11:35:49 +01:00
Damian Guy fef7fca2af KAFKA-4594; Annotate integration tests and provide gradle build targets to run subsets of tests
This uses JUnit Categories to identify integration tests. Adds 2 new build targets:
`integrationTest` and `unitTest`.

Author: Damian Guy <damian.guy@gmail.com>

Reviewers: Eno Thereska <eno@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>, Ismael Juma <ismael@juma.me.uk>

Closes #2695 from dguy/junit-categories
2017-03-21 10:12:36 +00:00
Colin P. Mccabe c9872cb214 KAFKA-4773; The Kafka build should run findbugs
Author: Colin P. Mccabe <cmccabe@confluent.io>

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

Closes #2557 from cmccabe/KAFKA-4773
2017-02-28 23:20:12 +00:00
Damian Guy 516d328494 MINOR: update README with how to run code coverage on module. add reportCoverage at subProject level
Author: Damian Guy <damian.guy@gmail.com>

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

Closes #2527 from dguy/code-coverage
2017-02-10 09:15:12 -08:00
Dhwani Katagade b6c34e2df5 KAFKA-4617; Improve configuration of Gradle’s eclipse task
Generate core project with correct source folders. In addition
set output folders same as command line build. Don't generate
unnecessary projects.

Author: Dhwani Katagade <dhwani_katagade@persistent.com>

Reviewers: Edoardo Comar <ecomar@uk.ibm.com>, Guozhang Wang <wangguoz@gmail.com>, Ismael Juma <ismael@juma.me.uk>

Closes #2382 from dhwanikatagade/gradle_eclipse_plugin_path_fix
2017-02-10 02:45:29 +00:00
Colin P. Mccabe e156f5179f KAFKA-4552; README.md has org.gradle.project.maxParallelForms instead of maxParallelForks
Author: Colin P. Mccabe <cmccabe@confluent.io>

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

Closes #2270 from cmccabe/KAFKA-4552
2016-12-16 15:02:46 -08:00
Konstantine Karantasis aad9384066 MINOR: Extract SCALA_BINARY_VERSION from SCALA_VERSION
Will allow users to set one fewer environment variable if they need to
change scala version. Still, SCALA_BINARY_VERSION can be explicitly set.

Author: Konstantine Karantasis <konstantine@confluent.io>

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

Closes #2130 from kkonstantine/MINOR-Extract-SCALA_BINARY_VERSION-from-SCALA_VERSION
2016-11-17 02:15:14 +00:00
Jaikiran Pai 6fb25f080f MINOR: Update the README.md to include a note about GRADLE_USER_HOME
Trying to build the source and publish it to internal Maven repo, I ran into an issue that I explain in the mailing list discussion here https://www.mail-archive.com/devkafka.apache.org/msg56359.html.

The commit here updates the README.md to make a note that the GRADLE_USER_HOME environment variable plays a role in deciding which file to add the maven configs to.

Author: Jaikiran Pai <jaikiran.pai@gmail.com>

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

Closes #1837 from jaikiran/readme-update-grade-user-home
2016-09-17 23:01:32 +01:00
David Chen c1bce2d757 KAFKA-4162: Fixed typo "rebalance"
Author: David Chen <mvjome@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1853 from mvj3/KAFKA-4162
2016-09-14 10:38:40 -07:00
Guozhang Wang 76ca6f8cc1 MINOR: Add user overridden test logging events
Author: Guozhang Wang <wangguoz@gmail.com>

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

Closes #1456 from guozhangwang/Kminor-test-logging
2016-06-03 10:30:01 +01:00
Ismael Juma 9791401a77 KAFKA-3717; Support building aggregate javadoc for all project modules
The task is called `aggregatedJavadoc` and the generated html will be under `<project.dir>/build/docs/javadoc/`.

I also disabled javadoc for `tools` and `log4j-appender` as they are not public API.

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

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1398 from ijuma/kafka-3717-aggregate-javadoc
2016-05-19 00:47:14 +01:00
Grant Henke 623ab1e7c6 KAFKA-3451: Add basic HTML coverage report generation to gradle
Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira, Ismael Juma, Ewen Cheslack-Postava

Closes #1121 from granthenke/coverage
2016-03-31 10:07:54 -07:00
Ismael Juma ee9995583a KAFKA-3357; Update to Scala 2.11.8
Scala 2.11.8 has been released with a number of bug fixes:
* http://www.scala-lang.org/news/2.11.8/

There are a few important collection fixes:
* https://issues.scala-lang.org/browse/SI-9497
* https://github.com/scala/scala/pull/4714
* https://github.com/scala/scala/pull/4693

And also some pattern matcher fixes.

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

Reviewers: Grant Henke, Ashish Singh

Closes #1032 from ijuma/kafka-3357-update-to-scala-2.11.8
2016-03-09 17:57:24 -08:00
Grant Henke f25fe02d99 KAFKA-3286: Add plugin to quickly check for outdated dependencies
Adds a gradle task to generate a report of outdate release dependencies:
`gradle dependencyUpdates`

Updates a few minor versions.

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ismael Juma, Gwen Shapira

Closes #973 from granthenke/outdated-deps
2016-03-03 15:10:16 -08:00
Vahid Hashemian 1388ed9ba2 KAFKA-3116; Specify minimum Gradle version required in Readme
Author: Vahid Hashemian <vahidhashemian@us.ibm.com>

Reviewers: Gwen Shapira

Closes #813 from vahidhashemian/KAFKA-3116
2016-01-26 15:33:48 -08:00
Ismael Juma 8d67485799 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
2016-01-08 15:13:14 -08:00
Ismael Juma 9545cc8834 MINOR: Improve README
Mention Java 7 requirement, fix and improve formatting and remove obsolete reference to SVN website.

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

Reviewers: Sriharsha Chintalapani <harsha@hortonworks.com>, Jason Gustafson <jason@confluent.io>

Closes #677 from ijuma/mention-java-requirement-in-readme
2015-12-15 10:55:24 -08:00
Ismael Juma 3022c1938d MINOR: Introduce `installAll` and accept major as well as full Scala version
We can take advantage of the fact that major Scala versions are binary compatible (since 2.10) to make the build a little more user-friendly.

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

Reviewers: Ewen Cheslack=Postava, Grant Henke

Closes #574 from ijuma/install-all-and-major-instead-of-full-version
2015-11-24 17:41:02 -08:00
Grant Henke 8f6ffe1c28 KAFKA-2800; Update outdated dependencies
Changes:
* org.scala-lang:scala-library [2.10.5 -> 2.10.6]
   * Scala 2.10.6 resolves a license incompatibility in scala.util.Sorting
   * Otherwise identical to Scala 2.10.5
* org.xerial.snappy:snappy-java [1.1.1.7 -> 1.1.2]
   * Fixes SnappyOutputStream.close() is not idempotent
* net.jpountz.lz4:lz4 [1.2.0 -> 1.3]
* junit:junit [4.11 -> 4.12]
* org.easymock:easymock [3.3.1 -> 3.4]
* org.powermock:powermock-api-easymock [1.6.2 -> 1.6.3]
* org.powermock:powermock-module-junit4 [1.6.2 -> 1.6.3]
* org.slf4j:slf4j-api [1.7.6 -> 1.7.12]
* org.slf4j:slf4j-log4j12 [1.7.6 -> 1.7.12]
* com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider [2.5.4 -> 2.6.3]
* com.fasterxml.jackson.core:jackson-databind [2.5.4 -> 2.6.3]
* org.eclipse.jetty:jetty-server [9.2.12.v20150709 -> 9.2.14.v20151106]
* org.eclipse.jetty:jetty-servlet [9.2.12.v20150709 -> 9.2.14.v20151106]
* org.bouncycastle:bcpkix-jdk15on [1.52 -> 1.53]
* net.sf.jopt-simple:jopt-simple [3.2 -> 4.9]
* removed explicit entry for org.objenesis:objenesis:2.2 (resolved transitively)

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>

Closes #513 from granthenke/update-deps
2015-11-18 10:42:15 -08:00
Grant Henke 69af573b35 KAFKA-2783; Drop outdated hadoop contrib modules
Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #466 from granthenke/drop-contrib
2015-11-09 11:02:46 -08:00
Gabriel Avellaneda 241b9ab58d MINOR: Fixed README examples on running specific tests.
Author: GabrielNicolasAvellaneda <avellaneda.gabriel@gmail.com>

Reviewers: Ismael Juma, Ewen Cheslack-Postava

Closes #268 from GabrielNicolasAvellaneda/readme-updates
2015-10-18 22:45:27 -07:00
Ewen Cheslack-Postava d7340503a1 KAFKA-2613; Make maxParallelForks configurable via Gradle config so it can be turned down on shared build infrastructure.
Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Ismael Juma, Sriharsha Chintalapani

Closes #293 from ewencp/kafka-2613-user-configurable-max-forks
2015-10-12 18:26:38 -07:00
Ismael Juma fd3a3cd595 KAFKA-2348; Drop support for Scala 2.9
`testAll` passed locally.

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

Reviewers: Harsha, Ewen, Guozhang

Closes #87 from ijuma/kafka-2348-drop-support-for-scala-2.9 and squashes the following commits:

cf9796a [Ismael Juma] KAFKA-2348; Drop support for Scala 2.9
2015-07-24 09:19:59 -07:00
Ismael Juma 15cba9f00d KAFKA-2324; Update to Scala 2.11.7
Author: Ismael Juma <ismael@juma.me.uk>

Closes #82 from ijuma/kafka-2324 and squashes the following commits:

d71bf5c [Ismael Juma] KAFKA-2324; Update to Scala 2.11.7
2015-07-16 21:46:46 -07:00
Ewen Cheslack-Postava 3d8494bca3 KAFKA-2199 Make signing artifacts optional and disabled by
default for SNAPSHOTs and allow remote Maven repository configuration from
 the command line.
2015-05-29 14:50:45 -07:00
Ismael Juma 66c6f9b1c4 kafka-2039; Update Scala to 2.10.5 and 2.11.6; patched by Ismael Juma; reviewed by Jun Rao 2015-04-01 13:26:45 -07:00
Jay Kreps 1c6d5bbac6 KAFKA-1915: Add checkstyle for java code. 2015-02-03 09:16:55 -08:00
jaikiran pai 0b171dee1f KAFKA-1885 Upgrade junit dependency in core to 4.6 version to allow running individual test methods via gradle command line; reviewed by Neha Narkhede 2015-01-25 19:15:57 -08:00
Jun Rao 5d648cfdb1 KAFKA-1876; pom file for scala 2.11 should reference a specific version; patched by Jun Rao; reviewed by Joe Stein and Sriharsha Chintalapani 2015-01-19 11:18:23 -08:00
Joe Stein 09e2fd651e KAFKA-1173 Using Vagrant to get up and running with Apache Kafka patch by Ewen Cheslack-Postava reviewed by Joe Stein 2014-12-05 08:37:11 -05:00
Jun Rao 27bc37289c trivial change to README to make the gradle wrapper download clearer 2014-09-23 14:39:10 -07:00
Joe Stein d2d1ef357b KAFKA-1490 remove gradlew initial setup output from source distribution patch by Ivan Lyutov reviewed by Joe Stein 2014-09-23 12:06:17 -04:00
Stevo Slavic f9d9b38143 kafka-1419 (followup); cross build for scala 2.11; patched by Stevo Slavic; reviewed by Jun Rao 2014-09-14 10:45:37 -07:00