| <?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.5.2-SNAPSHOT</version> |
| <relativePath>../../pom.xml</relativePath> |
| </parent> |
| |
| <artifactId>spark-protobuf_2.12</artifactId> |
| <properties> |
| <sbt.project.name>protobuf</sbt.project.name> |
| </properties> |
| <packaging>jar</packaging> |
| <name>Spark Protobuf</name> |
| <url>https://spark.apache.org/</url> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-sql_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-core_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-catalyst_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-sql_${scala.binary.version}</artifactId> |
| <version>${project.version}</version> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.scalacheck</groupId> |
| <artifactId>scalacheck_${scala.binary.version}</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.spark</groupId> |
| <artifactId>spark-tags_${scala.binary.version}</artifactId> |
| </dependency> |
| <!-- #if scala-2.13 --><!-- |
| <dependency> |
| <groupId>org.scala-lang.modules</groupId> |
| <artifactId>scala-parallel-collections_${scala.binary.version}</artifactId> |
| </dependency> |
| --><!-- #endif scala-2.13 --> |
| <dependency> |
| <groupId>com.google.protobuf</groupId> |
| <artifactId>protobuf-java</artifactId> |
| <scope>compile</scope> |
| </dependency> |
| <dependency> |
| <groupId>com.google.protobuf</groupId> |
| <artifactId>protobuf-java-util</artifactId> |
| <scope>compile</scope> |
| </dependency> |
| </dependencies> |
| <build> |
| <outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory> |
| <testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <configuration> |
| <shadedArtifactAttached>false</shadedArtifactAttached> |
| <shadeTestJar>false</shadeTestJar> |
| <artifactSet> |
| <includes> |
| <include>com.google.protobuf:*</include> |
| </includes> |
| </artifactSet> |
| <relocations> |
| <relocation> |
| <pattern>com.google.protobuf</pattern> |
| <shadedPattern>${spark.shade.packageName}.spark_protobuf.protobuf</shadedPattern> |
| <includes> |
| <include>com.google.protobuf.**</include> |
| </includes> |
| </relocation> |
| </relocations> |
| <filters> |
| <filter> |
| <artifact>*:*</artifact> |
| <excludes> |
| <exclude>google/protobuf/**</exclude> |
| </excludes> |
| </filter> |
| </filters> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>default-protoc</id> |
| <activation> |
| <activeByDefault>true</activeByDefault> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>com.github.os72</groupId> |
| <artifactId>protoc-jar-maven-plugin</artifactId> |
| <version>${protoc-jar-maven-plugin.version}</version> |
| <!-- Generates Java classes and descriptor files from Protobuf files. --> |
| <executions> |
| <execution> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <protocArtifact>com.google.protobuf:protoc:${protobuf.version}</protocArtifact> |
| <protocVersion>${protobuf.version}</protocVersion> |
| <inputDirectories> |
| <include>src/test/resources/protobuf</include> |
| </inputDirectories> |
| <includeStdTypes>true</includeStdTypes> |
| <outputTargets> |
| <outputTarget> |
| <type>java</type> |
| <addSources>test</addSources> |
| </outputTarget> |
| <outputTarget> |
| <type>descriptor</type> |
| <addSources>test</addSources> |
| </outputTarget> |
| </outputTargets> |
| </configuration> |
| </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> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>com.github.os72</groupId> |
| <artifactId>protoc-jar-maven-plugin</artifactId> |
| <version>${protoc-jar-maven-plugin.version}</version> |
| <!-- Generates Java classes and descriptor files from Protobuf files. --> |
| <executions> |
| <execution> |
| <phase>generate-test-sources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <protocArtifact>com.google.protobuf:protoc:${protobuf.version}</protocArtifact> |
| <protocVersion>${protobuf.version}</protocVersion> |
| <protocCommand>${spark.protoc.executable.path}</protocCommand> |
| <inputDirectories> |
| <include>src/test/resources/protobuf</include> |
| </inputDirectories> |
| <includeStdTypes>true</includeStdTypes> |
| <outputTargets> |
| <outputTarget> |
| <type>java</type> |
| <addSources>test</addSources> |
| </outputTarget> |
| <outputTarget> |
| <type>descriptor</type> |
| <addSources>test</addSources> |
| </outputTarget> |
| </outputTargets> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |