Add runner-specific profiles to the examples pom.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/80792848 Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/80792848 Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/80792848 Branch: refs/heads/master Commit: 807928482706db1bd7904207487adc65c5f435b6 Parents: 32b9381 Author: Kenneth Knowles <k...@google.com> Authored: Thu Nov 3 16:17:18 2016 -0700 Committer: Kenneth Knowles <k...@google.com> Committed: Tue Nov 8 13:39:06 2016 -0800 ---------------------------------------------------------------------- examples/java/pom.xml | 62 ++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/80792848/examples/java/pom.xml ---------------------------------------------------------------------- diff --git a/examples/java/pom.xml b/examples/java/pom.xml index 6d18a0f..f66fd36 100644 --- a/examples/java/pom.xml +++ b/examples/java/pom.xml @@ -39,22 +39,13 @@ </properties> <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> @@ -62,41 +53,43 @@ <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 Flink runner with -P flink-runner --> + <profile> + <id>flink-runner</id> + <dependencies> <dependency> <groupId>org.apache.beam</groupId> <artifactId>beam-runners-flink_2.10</artifactId> - <version>${project.version}</version> <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-google-cloud-dataflow-java</artifactId> - <version>${project.version}</version> + <artifactId>beam-runners-spark</artifactId> <scope>runtime</scope> - <optional>true</optional> </dependency> - <dependency> - <groupId>org.apache.beam</groupId> - <artifactId>beam-runners-spark</artifactId> - <version>${project.version}</version> + <groupId>org.apache.spark</groupId> + <artifactId>spark-streaming_2.10</artifactId> + <version>${spark.version}</version> <scope>runtime</scope> - <optional>true</optional> </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> @@ -104,16 +97,22 @@ </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> + + <!-- Custom set up for our Jenkins precommit tests that comment on GitHub --> <profile> <id>jenkins-precommit</id> <properties> @@ -448,7 +447,6 @@ <dependency> <groupId>org.apache.beam</groupId> <artifactId>beam-runners-direct-java</artifactId> - <version>${project.version}</version> <scope>test</scope> </dependency>