If you want to clone this repository to start your own project, you can choose the license you prefer and feel free to delete anything related to the license you are dropping.
ℹ️ Apache Beam currently only supports Java 8 (LTS) and Java 11 (LTS).
⚠️ Java 8 ends its active support in March 2022, so we recommend using Java 11 (LTS) until Java 17 (LTS) is supported.
# Install sdkman. curl -s "https://get.sdkman.io" | bash # Make sure you have Java 11 installed. sdk install java 11.0.12-tem
This is a very basic Apache Beam project to help you get started.
There are only two source files:
src/main/java/com/example/App.java: the application source file, containing the
mainmethod. The main class is
src/test/java/com/example/AppTest.java: tests for the
ℹ️ Most build tools expect all the Java source files to be under
src/main/java/and tests to be under
Gradle is a build tool focused on flexibility and performance.
This is a build tool widely used by many projects.
sdk install gradle
# To do a simple run. gradle run # To run passing command line arguments. gradle run --args=--inputText="🎉" # To run the tests. gradle test --info
# Build a self-contained jar. gradle jar # Run the jar application. java -jar build/pipeline.jar --inputText="🎉"
sbt (Scala Build Tool) is a type-safe build tool for Scala and Java projects. Since it's type-safe, most errors are caught before the build starts.
This is probably the simplest option, but isn't as widely used as Gradle.
sdk install sbt
# To do a simple run. sbt run # To run passing command line arguments. sbt 'run --inputText="🎉"' # To run the tests. sbt test
# Build a self-contained jar. sbt assembly # Run the jar application. java -jar build/pipeline.jar --inputText="🎉"
Apache Maven is a project management and comprehension tool based on the concept of a project object model (POM).
This is by far the trickiest to configure, but many older projects still use it.
If you are starting a new project, we recommend using Gradle or
sdk install maven
# To do a simple run. mvn compile exec:java # To run passing command line arguments. mvn compile exec:java -Dexec.args=--inputText="🎉" # To run the tests. mvn test
# Build a self-contained jar. mvn package # Run the jar application. java -jar target/beam-java-starter-1-jar-with-dependencies.jar --inputText="🎉"
This project already comes with automated testing via GitHub Actions.
To configure it, look at the
To keep this template small, it only includes the Direct Runner.
For a comparison of what each runner currently supports, look at the Beam Capability Matrix.
To add a new runner, visit the runner's page for instructions on how to include it.
Thank you for your interest in contributing! All contributions are welcome! 🎉🎊
Please refer to the
CONTRIBUTING.md file for more information.
This software is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE for details.