/
githubmirror
/
spark
Обзор
Документация
Войти
/
githubmirror
/
spark
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
common/config/pom.xml
187 строк
7 KB
Wenchen Fan
[SPARK-56460][CORE] Define configs in text files
27 июл 2026, 18:45
27 июл 2026, 18:45
2d5e1b6
Код
Авторство
О чём код?
<?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.13</artifactId> <version>5.0.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>spark-config_2.13</artifactId> <packaging>jar</packaging> <name>Spark Project Config</name> <url>https://spark.apache.org/</url> <properties> <sbt.project.name>config</sbt.project.name> </properties> <dependencies> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-tags_${scala.binary.version}</artifactId> </dependency> <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <scope>compile</scope> </dependency> <!-- This spark-tags test-dep is needed even though it isn't used in this module, otherwise testing-cmds that exclude them will yield errors. --> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-tags_${scala.binary.version}</artifactId> <type>test-jar</type> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <scope>test</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> <!-- Override the parent pom's shade configuration completely (rather than merging) so this module bundles protobuf-java relocated into a shared org.sparkproject.protobuf package. This keeps the unshaded protobuf-java off the classpath of every consumer of this low-level module (notably spark-common-utils, and transitively spark-core and the assembly), and removes protobuf-java from this module's published (dependency-reduced) pom. The relocation package is intentionally general (not config-specific) so other low-level modules can share it in the future. --> <configuration combine.self="override"> <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}.protobuf</shadedPattern> <includes> <include>com.google.protobuf.**</include> </includes> </relocation> </relocations> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>google/protobuf/**</exclude> </excludes> </filter> </filters> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <profiles> <profile> <id>default-protoc</id> <activation> <property> <name>!skipDefaultProtoc</name> </property> </activation> <build> <plugins> <plugin> <groupId>com.github.os72</groupId> <artifactId>protoc-jar-maven-plugin</artifactId> <version>${protoc-jar-maven-plugin.version}</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>run</goal> </goals> <configuration> <protocArtifact>com.google.protobuf:protoc:${protobuf.version}</protocArtifact> <protocVersion>${protobuf.version}</protocVersion> <inputDirectories> <include>src/main/protobuf</include> </inputDirectories> </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> <executions> <execution> <phase>generate-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/main/protobuf</include> </inputDirectories> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>