| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~ contributor license agreements. See the NOTICE file distributed with |
| ~ this work for additional information regarding copyright ownership. |
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~ (the "License"); you may not use this file except in compliance with |
| ~ the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| <parent> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-parent_2.12</artifactId> |
| <version>3.4.0</version> |
| <relativePath>../../../pom.xml</relativePath> |
| </parent> |
| |
| <artifactId>spark-connect-common_2.12</artifactId> |
| <packaging>jar</packaging> |
| <name>Spark Project Connect Common</name> |
| <url>https://spark.apache.org/</url> |
| <properties> |
| <sbt.project.name>connect-common</sbt.project.name> |
| <guava.version>31.0.1-jre</guava.version> |
| <guava.failureaccess.version>1.0.1</guava.failureaccess.version> |
| <io.grpc.version>1.47.0</io.grpc.version> |
| <tomcat.annotations.api.version>6.0.53</tomcat.annotations.api.version> |
| </properties> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-catalyst_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <scope>provided</scope> |
| <exclusions> |
| <exclusion> |
| <groupId>com.google.guava</groupId> |
| <artifactId>guava</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>org.scala-lang</groupId> |
| <artifactId>scala-library</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.google.protobuf</groupId> |
| <artifactId>protobuf-java</artifactId> |
| <version>${protobuf.version}</version> |
| <scope>compile</scope> |
| </dependency> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-netty</artifactId> |
| <version>${io.grpc.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-protobuf</artifactId> |
| <version>${io.grpc.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-services</artifactId> |
| <version>${io.grpc.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.grpc</groupId> |
| <artifactId>grpc-stub</artifactId> |
| <version>${io.grpc.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.netty</groupId> |
| <artifactId>netty-codec-http2</artifactId> |
| <version>${netty.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>io.netty</groupId> |
| <artifactId>netty-handler-proxy</artifactId> |
| <version>${netty.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>io.netty</groupId> |
| <artifactId>netty-transport-native-unix-common</artifactId> |
| <version>${netty.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> <!-- necessary for Java 9+ --> |
| <groupId>org.apache.tomcat</groupId> |
| <artifactId>annotations-api</artifactId> |
| <version>${tomcat.annotations.api.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| <!-- |
| This spark-tags test-dep is needed even though it isn't used in this module, |
| otherwise testing-cmds that excludethem will yield errors. |
| --> |
| <dependency> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-tags_${scala.binary.version}</artifactId> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| <build> |
| <!-- Protobuf compilation for Spark Connect --> |
| <extensions> |
| <extension> |
| <groupId>kr.motd.maven</groupId> |
| <artifactId>os-maven-plugin</artifactId> |
| <version>1.6.2</version> |
| </extension> |
| </extensions> |
| <outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory> |
| <testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>add-sources</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>src/main/scala-${scala.binary.version}</source> |
| </sources> |
| </configuration> |
| </execution> |
| <execution> |
| <id>add-scala-test-sources</id> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>add-test-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>src/test/gen-java</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>default-protoc</id> |
| <activation> |
| <activeByDefault>true</activeByDefault> |
| </activation> |
| <build> |
| <plugins> |
| <!-- Add protobuf-maven-plugin and provide ScalaPB as a code generation plugin --> |
| <plugin> |
| <groupId>org.xolstice.maven.plugins</groupId> |
| <artifactId>protobuf-maven-plugin</artifactId> |
| <version>0.6.1</version> |
| <configuration> |
| <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact> |
| <pluginId>grpc-java</pluginId> |
| <pluginArtifact>io.grpc:protoc-gen-grpc-java:${io.grpc.version}:exe:${os.detected.classifier}</pluginArtifact> |
| <protoSourceRoot>src/main/protobuf</protoSourceRoot> |
| </configuration> |
| <executions> |
| <execution> |
| <goals> |
| <goal>compile</goal> |
| <goal>compile-custom</goal> |
| <goal>test-compile</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>user-defined-protoc</id> |
| <properties> |
| <spark.protoc.executable.path>${env.SPARK_PROTOC_EXEC_PATH}</spark.protoc.executable.path> |
| <connect.plugin.executable.path>${env.CONNECT_PLUGIN_EXEC_PATH}</connect.plugin.executable.path> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.xolstice.maven.plugins</groupId> |
| <artifactId>protobuf-maven-plugin</artifactId> |
| <version>0.6.1</version> |
| <configuration> |
| <protocExecutable>${spark.protoc.executable.path}</protocExecutable> |
| <pluginId>grpc-java</pluginId> |
| <pluginExecutable>${connect.plugin.executable.path}</pluginExecutable> |
| <protoSourceRoot>src/main/protobuf</protoSourceRoot> |
| </configuration> |
| <executions> |
| <execution> |
| <goals> |
| <goal>compile</goal> |
| <goal>compile-custom</goal> |
| <goal>test-compile</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |