This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a commit to branch mergebot
in repository

commit cb9cbf7cc870b366366ef5e3ad46517a36500823
Author: Lorenzo Caggioni <>
AuthorDate: Tue Jan 30 14:48:04 2018 +0100

    Add procedure to create a self executing Jar for DataFlow
 src/documentation/runners/ | 54 +++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/src/documentation/runners/ 
index 9be4ce3..2ff8198 100644
--- a/src/documentation/runners/
+++ b/src/documentation/runners/
@@ -64,6 +64,60 @@ For more information, see the *Before you begin* section of 
the [Cloud Dataflow
 <span class="language-py">This section is not applicable to the Beam SDK for 
+### Self executing JAR
+This section is not applicable to the Beam SDK for Python.
+In some cases, such as starting a pipeline using a scheduler such as [Apache 
AirFlow](, you must have a self-contained 
application. You can pack a self-executing JAR by explicitly adding the 
following dependency on the Project section of your pom.xml, in addition to the 
adding existing dependency shown in the previous section.
+    <groupId>org.apache.beam</groupId>
+    <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
+    <version>${beam.version}</version>
+    <scope>runtime</scope>
+Then, add the mainClass name in the Maven JAR plugin.
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-jar-plugin</artifactId>
+  <version>${maven-jar-plugin.version}</version>
+  <configuration>
+    <archive>
+      <manifest>
+        <addClasspath>true</addClasspath>
+        <classpathPrefix>lib/</classpathPrefix>
+        <mainClass>YOUR_MAIN_CLASS_NAME</mainClass>
+      </manifest>
+    </archive>
+  </configuration>
+After running <code>mvn package</code>, run <code>ls target</code> and you 
should see (assuming your artifactId is `beam-examples` and the version is 
1.0.0) the following output.
+To run the self-executing JAR on Cloud Dataflow, use the following command.
+java -jar target/beam-examples-bundled-1.0.0.jar \
+  --runner=DataflowRunner \
+  --project=<YOUR_GCP_PROJECT_ID> \
+  --tempLocation=gs://<YOUR_GCS_BUCKET>/temp/
 ### Authentication
 Before running your pipeline, you must authenticate with the Google Cloud 
Platform. Run the following command to get [Application Default 

To stop receiving notification emails like this one, please contact

Reply via email to