You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kafka-1171; Gradle build for Kafka; patched by David Arthur, Joe Stein, Chris Freeman and Jun Rao; reviewed by Guozhang Wang, Joel Koshy and Neha Narkhede
See our [web site](http://kafka.apache.org) for details on the project.
4
+
5
+
## Building it ##
6
+
1. ./sbt update
7
+
2. ./sbt package
8
+
3. ./sbt assembly-package-dependency
9
+
10
+
To build for a particular version of Scala (either 2.8.0, 2.8.2, 2.9.1, 2.9.2 or 2.10.1), change step 2 above to:
11
+
2. ./sbt "++2.8.0 package"
12
+
13
+
To build for all supported versions of Scala, change step 2 above to:
14
+
2. ./sbt +package
15
+
16
+
## Running it ##
17
+
Follow instuctions in http://kafka.apache.org/documentation.html#quickstart
18
+
19
+
## Running unit tests ##
20
+
./sbt test
21
+
22
+
## Building a binary release zip or gzipped tar ball ##
23
+
./sbt release-zip
24
+
./sbt release-tar
25
+
The release file can be found inside ./target/RELEASE/.
26
+
27
+
## Other Build Tips ##
28
+
Here are some useful sbt commands, to be executed at the sbt command prompt (./sbt). Prefixing with "++<version> " runs the
29
+
command for a specific Scala version, prefixing with "+" will perform the action for all versions of Scala, and no prefix
30
+
runs the command for the default (2.8.0) version of Scala. -
31
+
32
+
tasks : Lists all the sbt commands and their descriptions
33
+
clean : Deletes all generated files (the target directory).
34
+
compile : Compile all the sub projects, but not create the jars
35
+
test : Run all unit tests in all sub projects
36
+
release-zip : Create all the jars, run unit tests and create a deployable release zip
37
+
release-tar : Create all the jars, run unit tests and create a deployable release gzipped tar tall
38
+
package: Creates jars for src, test, docs etc
39
+
projects : List all the sub projects
40
+
project sub_project_name : Switch to a particular sub-project. For example, to switch to the core kafka code, use "project core-kafka"
41
+
42
+
The following commands can be run only on a particular sub project -
43
+
test-only package.test.TestName : Runs only the specified test in the current sub project
44
+
run : Provides options to run any of the classes that have a main method. For example, you can switch to project java-examples, and run the examples there by executing "project java-examples" followed by "run"
45
+
46
+
For more details please see the [SBT documentation](https://github.com/harrah/xsbt/wiki)
47
+
48
+
## Contribution ##
49
+
50
+
Kafka is a new project, and we are interested in building the community; we would welcome any thoughts or [patches](https://issues.apache.org/jira/browse/KAFKA). You can reach us [on the Apache mailing lists](http://kafka.apache.org/contact.html).
51
+
52
+
To contribute follow the instructions here:
53
+
*http://kafka.apache.org/contributing.html
54
+
55
+
We also welcome patches for the website and documentation which can be found here:
## Building a binary release zip or gzipped tar ball ##
23
-
./sbt release-zip
24
-
./sbt release-tar
25
-
The release file can be found inside ./target/RELEASE/.
26
-
27
-
## Other Build Tips ##
28
-
Here are some useful sbt commands, to be executed at the sbt command prompt (./sbt). Prefixing with "++<version> " runs the
29
-
command for a specific Scala version, prefixing with "+" will perform the action for all versions of Scala, and no prefix
30
-
runs the command for the default (2.8.0) version of Scala. -
31
-
32
-
tasks : Lists all the sbt commands and their descriptions
33
-
clean : Deletes all generated files (the target directory).
34
-
compile : Compile all the sub projects, but not create the jars
35
-
test : Run all unit tests in all sub projects
36
-
release-zip : Create all the jars, run unit tests and create a deployable release zip
37
-
release-tar : Create all the jars, run unit tests and create a deployable release gzipped tar tall
38
-
package: Creates jars for src, test, docs etc
39
-
projects : List all the sub projects
40
-
project sub_project_name : Switch to a particular sub-project. For example, to switch to the core kafka code, use "project core-kafka"
41
-
42
-
The following commands can be run only on a particular sub project -
43
-
test-only package.test.TestName : Runs only the specified test in the current sub project
44
-
run : Provides options to run any of the classes that have a main method. For example, you can switch to project java-examples, and run the examples there by executing "project java-examples" followed by "run"
45
-
46
-
For more details please see the [SBT documentation](https://github.com/harrah/xsbt/wiki)
33
+
## Building a binary release gzipped tar ball ##
34
+
./gradlew clean
35
+
./gradlew releaseTarGz
36
+
The release file can be found inside ./core/build/distributions/.
37
+
38
+
## Cleaning the build ##
39
+
./gradlew clean
40
+
41
+
## Running a task on a particular version of Scala (either 2.8.0, 2.8.2, 2.9.1, 2.9.2 or 2.10.1) ##
42
+
## (If building a jar with a version other than 2.8.0, the scala version variable in bin/kafka-run-class.sh needs to be changed to run quick start.) ##
43
+
./gradlew -PscalaVersion=2.9.1 jar
44
+
./gradlew -PscalaVersion=2.9.1 test
45
+
./gradlew -PscalaVersion=2.9.1 releaseTarGz
46
+
47
+
## Running a task for a specific project in 'core', 'perf', 'contrib:hadoop-consumer', 'contrib:hadoop-producer', 'examples', 'clients' ##
48
+
./gradlew core:jar
49
+
./gradlew core:test
50
+
51
+
## Listing all gradle tasks ##
52
+
./gradlew tasks
53
+
54
+
# Building IDE project ##
55
+
./gradlew eclipse
56
+
./gradlew idea
57
+
58
+
# Building the jar for all scala versions and for all projects ##
59
+
./gradlew jarAll
60
+
61
+
## Running unit tests for all scala versions and for all projects ##
62
+
./gradlew testAll
63
+
64
+
## Building a binary release gzipped tar ball for all scala versions ##
65
+
./gradlew releaseTarGzAll
66
+
67
+
## Publishing the jar for all version of Scala and for all projects to maven (To test locally, change mavenUrl in gradle.properties to a local dir.) ##
68
+
./gradlew uploadArchivesAll
69
+
70
+
## Building the test jar ##
71
+
./gradlew testJar
72
+
73
+
## Determining how transitive dependencies are added ##
0 commit comments