beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/3] beam git commit: Add per-runner profile to Java 8 examples
Date Wed, 10 May 2017 00:07:15 GMT
Repository: beam
Updated Branches:
  refs/heads/master c4adbd371 -> b9ea415b6


Add per-runner profile to Java 8 examples


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/038febbd
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/038febbd
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/038febbd

Branch: refs/heads/master
Commit: 038febbd889cc98c5f6e579b31f84e19ff3981f5
Parents: 95d33c5
Author: Kenneth Knowles <klk@google.com>
Authored: Tue May 9 13:02:46 2017 -0700
Committer: Davor Bonaci <davor@google.com>
Committed: Tue May 9 17:06:57 2017 -0700

----------------------------------------------------------------------
 examples/java8/pom.xml | 83 +++++++++++++++++++++++++++++----------------
 1 file changed, 54 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/038febbd/examples/java8/pom.xml
----------------------------------------------------------------------
diff --git a/examples/java8/pom.xml b/examples/java8/pom.xml
index 5a94bee..3c9ed71 100644
--- a/examples/java8/pom.xml
+++ b/examples/java8/pom.xml
@@ -41,21 +41,11 @@
 
   <profiles>
     <!--
-      A default profile that includes optional dependencies
-      on all of our runners. This is aimed at making it very
-      easy for users to run examples with any runner without
-      any configuration. It is not needed or desirable when
-      testing the examples with a particular runner.
-
-      This profile can be disabled on the command line
-      by specifying -P !include-runners.
-
-      This profile cannot be lifted to examples-parent because
-      it would be automatically deactivated when the Java 8
-      profile were activated.
+      The direct runner is available by default.
+      You can also include it on the classpath explicitly with -P direct-runner
     -->
     <profile>
-      <id>include-runners</id>
+      <id>direct-runner</id>
       <activation>
         <activeByDefault>true</activeByDefault>
       </activation>
@@ -63,41 +53,72 @@
         <dependency>
           <groupId>org.apache.beam</groupId>
           <artifactId>beam-runners-direct-java</artifactId>
-          <version>${project.version}</version>
           <scope>runtime</scope>
-          <optional>true</optional>
         </dependency>
+      </dependencies>
+    </profile>
 
+    <!-- Include the Apache Apex runner with -P apex-runner -->
+    <profile>
+      <id>apex-runner</id>
+      <dependencies>
         <dependency>
           <groupId>org.apache.beam</groupId>
-          <artifactId>beam-runners-flink_2.10</artifactId>
-          <version>${project.version}</version>
+          <artifactId>beam-runners-apex</artifactId>
           <scope>runtime</scope>
-          <optional>true</optional>
         </dependency>
+        <!--
+          Apex depends on httpclient version 4.3.5, project has a transitive dependency to
httpclient 4.0.1 from
+          google-http-client. Apex dependency version being specified explicitly so that
it gets picked up. This
+          can be removed when the project no longer has a dependency on a different httpclient
version.
+        -->
+        <dependency>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpclient</artifactId>
+          <version>4.3.5</version>
+          <scope>runtime</scope>
+          <exclusions>
+            <exclusion>
+              <groupId>commons-codec</groupId>
+              <artifactId>commons-codec</artifactId>
+            </exclusion>
+          </exclusions>
+        </dependency>
+      </dependencies>
+    </profile>
 
+    <!-- Include the Apache Flink runner with -P flink-runner -->
+    <profile>
+      <id>flink-runner</id>
+      <dependencies>
         <dependency>
           <groupId>org.apache.beam</groupId>
-          <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
-          <version>${project.version}</version>
+          <artifactId>beam-runners-flink_2.10</artifactId>
           <scope>runtime</scope>
-          <optional>true</optional>
         </dependency>
+      </dependencies>
+    </profile>
 
+    <!-- Include the Apache Spark runner -P spark-runner -->
+    <profile>
+      <id>spark-runner</id>
+      <dependencies>
         <dependency>
           <groupId>org.apache.beam</groupId>
           <artifactId>beam-runners-spark</artifactId>
-          <version>${project.version}</version>
           <scope>runtime</scope>
-          <optional>true</optional>
         </dependency>
-
+        <dependency>
+          <groupId>org.apache.spark</groupId>
+          <artifactId>spark-streaming_2.10</artifactId>
+          <version>${spark.version}</version>
+          <scope>runtime</scope>
+        </dependency>
         <dependency>
           <groupId>org.apache.spark</groupId>
           <artifactId>spark-core_2.10</artifactId>
           <version>${spark.version}</version>
           <scope>runtime</scope>
-          <optional>true</optional>
           <exclusions>
             <exclusion>
               <groupId>org.slf4j</groupId>
@@ -105,13 +126,17 @@
             </exclusion>
           </exclusions>
         </dependency>
+      </dependencies>
+    </profile>
 
+    <!-- Include the Google Cloud Dataflow runner -P dataflow-runner -->
+    <profile>
+      <id>dataflow-runner</id>
+      <dependencies>
         <dependency>
-          <groupId>org.apache.spark</groupId>
-          <artifactId>spark-streaming_2.10</artifactId>
-          <version>${spark.version}</version>
+          <groupId>org.apache.beam</groupId>
+          <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
           <scope>runtime</scope>
-          <optional>true</optional>
         </dependency>
       </dependencies>
     </profile>


Mime
View raw message