Ban any Java SDK dependency in Fn Execution Libs A runner must not be forced to depend on any particular SDK during execution time. As these libraries are expected to be the default entry point into interacting with an SDK harness, these libraries may not introduce such a dependency edge, and are therefore prohibited.
Project: http://git-wip-us.apache.org/repos/asf/beam/repo Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/1a30e42e Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/1a30e42e Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/1a30e42e Branch: refs/heads/master Commit: 1a30e42ec8f6a875305214dc1b758d1d84e156a7 Parents: f80bf2f Author: Thomas Groh <[email protected]> Authored: Mon Nov 6 15:16:26 2017 -0800 Committer: Thomas Groh <[email protected]> Committed: Tue Nov 7 08:32:54 2017 -0800 ---------------------------------------------------------------------- runners/java-fn-execution/pom.xml | 29 +++++++++++++++++++++++++++++ sdks/java/fn-execution/pom.xml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/1a30e42e/runners/java-fn-execution/pom.xml ---------------------------------------------------------------------- diff --git a/runners/java-fn-execution/pom.xml b/runners/java-fn-execution/pom.xml index f57c58b..1941f49 100644 --- a/runners/java-fn-execution/pom.xml +++ b/runners/java-fn-execution/pom.xml @@ -32,6 +32,35 @@ <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce-banned-dependencies</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <bannedDependencies> + <excludes> + <exclude>com.google.guava:guava-jdk5</exclude> + <exclude>com.google.protobuf:protobuf-lite</exclude> + <exclude>org.apache.beam:beam-sdks-java-core</exclude> + </excludes> + </bannedDependencies> + </rules> + <fail>true</fail> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <dependencies> <dependency> <groupId>org.apache.beam</groupId> http://git-wip-us.apache.org/repos/asf/beam/blob/1a30e42e/sdks/java/fn-execution/pom.xml ---------------------------------------------------------------------- diff --git a/sdks/java/fn-execution/pom.xml b/sdks/java/fn-execution/pom.xml index 7c203eb..3bdec38 100644 --- a/sdks/java/fn-execution/pom.xml +++ b/sdks/java/fn-execution/pom.xml @@ -34,6 +34,39 @@ <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce-banned-dependencies</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <bannedDependencies> + <excludes> + <exclude>com.google.guava:guava-jdk5</exclude> + <exclude>com.google.protobuf:protobuf-lite</exclude> + <!-- Fn Execution contains shared utilities for Runners and Harnesses which use + the Portability framework. Runner-side interactions must not require a + dependency on any particular SDK, so this library must not introduce such an + edge. --> + <exclude>org.apache.beam:beam-sdks-java-core</exclude> + </excludes> + </bannedDependencies> + </rules> + <fail>true</fail> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <dependencies> <dependency> <groupId>org.apache.beam</groupId>
