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/2521c35e Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/2521c35e Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/2521c35e Branch: refs/heads/release-2.0.0 Commit: 2521c35ee3de17b88f4b3f10a74d38f58b6a4c09 Parents: adb83a8 Author: Kenneth Knowles <[email protected]> Authored: Tue May 9 13:02:46 2017 -0700 Committer: Davor Bonaci <[email protected]> Committed: Tue May 9 17:21:32 2017 -0700 ---------------------------------------------------------------------- examples/java8/pom.xml | 83 +++++++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/2521c35e/examples/java8/pom.xml ---------------------------------------------------------------------- diff --git a/examples/java8/pom.xml b/examples/java8/pom.xml index c777e19..7e60e41 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>
