This is an automated email from the ASF dual-hosted git repository. xiangfu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push: new 7a4c0b8b25 upgrade maven-shade-plugin version to 3.5.2 (#12712) 7a4c0b8b25 is described below commit 7a4c0b8b256733ca7c4d9613a2cf618ecb7cca33 Author: Xiang Fu <xiangfu.1...@gmail.com> AuthorDate: Fri Apr 19 06:28:25 2024 +0800 upgrade maven-shade-plugin version to 3.5.2 (#12712) * upgrade maven-shade-plugin to 3.5.2 * Remove build-shade jar profile --- .../scripts/pr-tests/.pinot_tests_unit.sh | 2 + pinot-clients/pinot-java-client/pom.xml | 1 + pinot-clients/pinot-jdbc-client/pom.xml | 35 +---------- pinot-common/pom.xml | 38 +---------- pinot-core/pom.xml | 35 ----------- pinot-distribution/pom.xml | 59 +---------------- pinot-perf/pom.xml | 1 - .../pinot-batch-ingestion-common/pom.xml | 1 - .../pinot-batch-ingestion-hadoop/pom.xml | 2 +- .../pinot-batch-ingestion-spark-2.4/pom.xml | 2 +- .../pinot-batch-ingestion-spark-3/pom.xml | 2 +- .../pinot-batch-ingestion-standalone/pom.xml | 2 +- .../pinot-environment/pinot-azure/pom.xml | 2 +- pinot-plugins/pinot-file-system/pinot-adls/pom.xml | 2 +- pinot-plugins/pinot-file-system/pinot-gcs/pom.xml | 2 +- pinot-plugins/pinot-file-system/pinot-hdfs/pom.xml | 2 +- pinot-plugins/pinot-file-system/pinot-s3/pom.xml | 53 +--------------- .../pinot-input-format/pinot-avro-base/pom.xml | 2 +- .../pinot-input-format/pinot-avro/pom.xml | 2 +- .../pinot-input-format/pinot-clp-log/pom.xml | 2 +- .../pinot-confluent-avro/pom.xml | 2 +- pinot-plugins/pinot-input-format/pinot-csv/pom.xml | 2 +- .../pinot-input-format/pinot-json/pom.xml | 2 +- pinot-plugins/pinot-input-format/pinot-orc/pom.xml | 2 +- .../pinot-input-format/pinot-parquet/pom.xml | 2 +- .../pinot-input-format/pinot-protobuf/pom.xml | 2 +- .../pinot-input-format/pinot-thrift/pom.xml | 2 +- .../pinot-metrics/pinot-dropwizard/pom.xml | 2 +- pinot-plugins/pinot-metrics/pinot-yammer/pom.xml | 2 +- .../pinot-minion-builtin-tasks/pom.xml | 1 - .../pinot-segment-uploader-default/pom.xml | 1 - .../pinot-segment-writer-file-based/pom.xml | 1 - .../pinot-stream-ingestion/pinot-kafka-2.0/pom.xml | 2 +- .../pinot-kafka-base/pom.xml | 2 +- .../pinot-stream-ingestion/pinot-kinesis/pom.xml | 67 +------------------- .../pinot-stream-ingestion/pinot-pulsar/pom.xml | 2 +- pinot-plugins/pom.xml | 73 ---------------------- pinot-spi/pom.xml | 35 ----------- pom.xml | 51 ++++++++++++++- 39 files changed, 81 insertions(+), 419 deletions(-) diff --git a/.github/workflows/scripts/pr-tests/.pinot_tests_unit.sh b/.github/workflows/scripts/pr-tests/.pinot_tests_unit.sh index fe440ff5eb..e50cdc93b6 100755 --- a/.github/workflows/scripts/pr-tests/.pinot_tests_unit.sh +++ b/.github/workflows/scripts/pr-tests/.pinot_tests_unit.sh @@ -33,6 +33,7 @@ if [ "$RUN_TEST_SET" == "1" ]; then -pl 'pinot-spi' \ -pl 'pinot-segment-spi' \ -pl 'pinot-common' \ + -pl ':pinot-yammer' \ -pl 'pinot-core' \ -pl 'pinot-query-planner' \ -pl 'pinot-query-runtime' \ @@ -46,5 +47,6 @@ if [ "$RUN_TEST_SET" == "2" ]; then -pl '!pinot-core' \ -pl '!pinot-query-planner' \ -pl '!pinot-query-runtime' \ + -pl '!:pinot-yammer' \ -P github-actions,no-integration-tests || exit 1 fi diff --git a/pinot-clients/pinot-java-client/pom.xml b/pinot-clients/pinot-java-client/pom.xml index 58d8add75a..6004a9ee39 100644 --- a/pinot-clients/pinot-java-client/pom.xml +++ b/pinot-clients/pinot-java-client/pom.xml @@ -33,6 +33,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../..</pinot.root> + <shade.phase.prop>package</shade.phase.prop> </properties> <build> <resources> diff --git a/pinot-clients/pinot-jdbc-client/pom.xml b/pinot-clients/pinot-jdbc-client/pom.xml index c0fd34c9f8..08c3880a48 100644 --- a/pinot-clients/pinot-jdbc-client/pom.xml +++ b/pinot-clients/pinot-jdbc-client/pom.xml @@ -33,6 +33,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../..</pinot.root> + <shade.phase.prop>package</shade.phase.prop> </properties> <build> <resources> @@ -81,38 +82,4 @@ <artifactId>jsr305</artifactId> </dependency> </dependencies> - - <profiles> - <profile> - <id>build-shaded-jar</id> - <activation> - <property> - <name>skipShade</name> - <value>!true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <version>3.2.1</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> - </transformers> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/pinot-common/pom.xml b/pinot-common/pom.xml index a1002ca458..16e5b6d41b 100644 --- a/pinot-common/pom.xml +++ b/pinot-common/pom.xml @@ -33,6 +33,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/..</pinot.root> + <shade.phase.prop>package</shade.phase.prop> </properties> <build> @@ -355,43 +356,6 @@ </dependency> </dependencies> <profiles> - <profile> - <id>build-shaded-jar</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <relocations> - <relocation> - <pattern>com.google.common.base</pattern> - <shadedPattern>${shade.prefix}.com.google.common.base</shadedPattern> - </relocation> - <relocation> - <pattern>com.google.common.cache</pattern> - <shadedPattern>${shade.prefix}.com.google.common.cache</shadedPattern> - </relocation> - <relocation> - <pattern>org.apache.http</pattern> - <shadedPattern>${shade.prefix}.org.apache.http</shadedPattern> - </relocation> - </relocations> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> <profile> <id>profile-buildthrift</id> <activation> diff --git a/pinot-core/pom.xml b/pinot-core/pom.xml index bd6217c241..6aa29f7d8e 100644 --- a/pinot-core/pom.xml +++ b/pinot-core/pom.xml @@ -179,39 +179,4 @@ </dependency> <!-- Lucene dependencies end --> </dependencies> - <profiles> - <profile> - <id>build-shaded-jar</id> - <activation> - <activeByDefault>false</activeByDefault> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <relocations> - <relocation> - <pattern>com.google.common.base</pattern> - <shadedPattern>${shade.prefix}.com.google.common.base</shadedPattern> - </relocation> - <relocation> - <pattern>org.apache.http</pattern> - <shadedPattern>${shade.prefix}.org.apache.http</shadedPattern> - </relocation> - </relocations> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/pinot-distribution/pom.xml b/pinot-distribution/pom.xml index 5a024f142d..99ce14fb42 100644 --- a/pinot-distribution/pom.xml +++ b/pinot-distribution/pom.xml @@ -34,6 +34,7 @@ <properties> <pinot.root>${basedir}/..</pinot.root> <maven.build.timestamp.format>yyyy-MM-dd'T'HHmmss'Z'</maven.build.timestamp.format> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> @@ -144,64 +145,6 @@ </algorithms> </configuration> </plugin> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <transformers combine.self="override"> - <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> - <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> - <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <manifestEntries> - <Multi-Release>true</Multi-Release> - </manifestEntries> - </transformer> - </transformers> - <!-- - Usually in hadoop environment, there are multiple jars with different versions. - Most of the NoSuchMethodExceptions are caused by class loading conflicts. - Class relocation ensures the reference of certain packages/classes in Pinot code to - shaded libs, e.g. jackson or guava. - Ref: https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html - --> - <relocations> - <relocation> - <pattern>com.google.common</pattern> - <shadedPattern>${shade.prefix}.com.google.common</shadedPattern> - </relocation> - <relocation> - <pattern>com.fasterxml.jackson</pattern> - <shadedPattern>${shade.prefix}.com.fasterxml.jackson</shadedPattern> - </relocation> - <relocation> - <pattern>org.apache.http</pattern> - <shadedPattern>${shade.prefix}.org.apache.http</shadedPattern> - </relocation> - <relocation> - <pattern>software.amazon</pattern> - <shadedPattern>${shade.prefix}.software.amazon</shadedPattern> - </relocation> - <relocation> - <pattern>org.reflections</pattern> - <shadedPattern>${shade.prefix}.org.reflections</shadedPattern> - </relocation> - <relocation> - <pattern>io.netty</pattern> - <shadedPattern>${shade.prefix}.io.netty</shadedPattern> - </relocation> - <relocation> - <pattern>org.apache.parquet</pattern> - <shadedPattern>${shade.prefix}.org.apache.parquet</shadedPattern> - </relocation> - </relocations> - </configuration> - </execution> - </executions> - </plugin> </plugins> </build> <profiles> diff --git a/pinot-perf/pom.xml b/pinot-perf/pom.xml index 6a4f64c5f6..a5d06f5d4b 100644 --- a/pinot-perf/pom.xml +++ b/pinot-perf/pom.xml @@ -214,7 +214,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> - <version>3.1.0</version> <executions> <!-- Run shade goal on package phase --> <execution> diff --git a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-common/pom.xml b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-common/pom.xml index e569bfdd97..6ac4cd73cb 100644 --- a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-common/pom.xml +++ b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-common/pom.xml @@ -35,6 +35,5 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>none</phase.prop> </properties> </project> diff --git a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-hadoop/pom.xml b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-hadoop/pom.xml index 099292d9da..d2acdedb4a 100644 --- a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-hadoop/pom.xml +++ b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-hadoop/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-2.4/pom.xml b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-2.4/pom.xml index 45568ae319..748d6de20c 100644 --- a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-2.4/pom.xml +++ b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-2.4/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> <scala.major.version>2.11</scala.major.version> <spark.version>2.4.6</spark.version> <scala.minor.version>2.11.11</scala.minor.version> diff --git a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-3/pom.xml b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-3/pom.xml index 1dfba13c99..1e8e5efd57 100644 --- a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-3/pom.xml +++ b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-3/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> <spark.version>3.5.1</spark.version> </properties> diff --git a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-standalone/pom.xml b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-standalone/pom.xml index 34b82ce0e7..468d0ff3b0 100644 --- a/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-standalone/pom.xml +++ b/pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-standalone/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-environment/pinot-azure/pom.xml b/pinot-plugins/pinot-environment/pinot-azure/pom.xml index 3fa9df89ac..50d109131c 100644 --- a/pinot-plugins/pinot-environment/pinot-azure/pom.xml +++ b/pinot-plugins/pinot-environment/pinot-azure/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-file-system/pinot-adls/pom.xml b/pinot-plugins/pinot-file-system/pinot-adls/pom.xml index 30d7cbc051..bd5219be62 100644 --- a/pinot-plugins/pinot-file-system/pinot-adls/pom.xml +++ b/pinot-plugins/pinot-file-system/pinot-adls/pom.xml @@ -33,7 +33,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-file-system/pinot-gcs/pom.xml b/pinot-plugins/pinot-file-system/pinot-gcs/pom.xml index 30525f47ee..dbf8f5cc8a 100644 --- a/pinot-plugins/pinot-file-system/pinot-gcs/pom.xml +++ b/pinot-plugins/pinot-file-system/pinot-gcs/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-file-system/pinot-hdfs/pom.xml b/pinot-plugins/pinot-file-system/pinot-hdfs/pom.xml index 9691e9a3c9..904a178ff4 100644 --- a/pinot-plugins/pinot-file-system/pinot-hdfs/pom.xml +++ b/pinot-plugins/pinot-file-system/pinot-hdfs/pom.xml @@ -33,7 +33,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-file-system/pinot-s3/pom.xml b/pinot-plugins/pinot-file-system/pinot-s3/pom.xml index 4eec102625..bd650eadf2 100644 --- a/pinot-plugins/pinot-file-system/pinot-s3/pom.xml +++ b/pinot-plugins/pinot-file-system/pinot-s3/pom.xml @@ -36,7 +36,7 @@ <properties> <pinot.root>${basedir}/../../..</pinot.root> <s3mock.version>2.12.2</s3mock.version> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> @@ -65,55 +65,4 @@ <scope>test</scope> </dependency> </dependencies> - - <profiles> - <profile> - <id>build-shaded-jar</id> - <activation> - <property> - <name>skipShade</name> - <value>!true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <version>3.2.1</version> - <executions> - <execution> - <phase>${phase.prop}</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> - </transformers> - <!-- - Usually in hadoop environment, there are multiple jars with different versions. - Most of the NoSuchMethodExceptions are caused by class loading conflicts. - Class relocation ensures the reference of certain packages/classes in Pinot code to - shaded libs, e.g. jackson or guava. - Ref: https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html - --> - <relocations> - <relocation> - <pattern>com.google.common</pattern> - <shadedPattern>${shade.prefix}.com.google.common</shadedPattern> - </relocation> - <relocation> - <pattern>com.fasterxml.jackson</pattern> - <shadedPattern>${shade.prefix}.com.fasterxml.jackson</shadedPattern> - </relocation> - </relocations> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/pinot-plugins/pinot-input-format/pinot-avro-base/pom.xml b/pinot-plugins/pinot-input-format/pinot-avro-base/pom.xml index 71373664a0..a55b08d100 100644 --- a/pinot-plugins/pinot-input-format/pinot-avro-base/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-avro-base/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-input-format/pinot-avro/pom.xml b/pinot-plugins/pinot-input-format/pinot-avro/pom.xml index 63540fc056..ba1640a48b 100644 --- a/pinot-plugins/pinot-input-format/pinot-avro/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-avro/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-input-format/pinot-clp-log/pom.xml b/pinot-plugins/pinot-input-format/pinot-clp-log/pom.xml index 49bff523fd..46ea0fc6bf 100644 --- a/pinot-plugins/pinot-input-format/pinot-clp-log/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-clp-log/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-input-format/pinot-confluent-avro/pom.xml b/pinot-plugins/pinot-input-format/pinot-confluent-avro/pom.xml index cd21edb99b..b489d28c89 100644 --- a/pinot-plugins/pinot-input-format/pinot-confluent-avro/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-confluent-avro/pom.xml @@ -35,7 +35,7 @@ <properties> <pinot.root>${basedir}/../../..</pinot.root> <kafka.lib.version>2.8.1</kafka.lib.version> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <repositories> <repository> diff --git a/pinot-plugins/pinot-input-format/pinot-csv/pom.xml b/pinot-plugins/pinot-input-format/pinot-csv/pom.xml index d323171600..8b9dc01252 100644 --- a/pinot-plugins/pinot-input-format/pinot-csv/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-csv/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-input-format/pinot-json/pom.xml b/pinot-plugins/pinot-input-format/pinot-json/pom.xml index 608cb65787..e1d57197b2 100644 --- a/pinot-plugins/pinot-input-format/pinot-json/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-json/pom.xml @@ -34,6 +34,6 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> </project> diff --git a/pinot-plugins/pinot-input-format/pinot-orc/pom.xml b/pinot-plugins/pinot-input-format/pinot-orc/pom.xml index 8f9480d960..1a92bf7cd4 100644 --- a/pinot-plugins/pinot-input-format/pinot-orc/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-orc/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-input-format/pinot-parquet/pom.xml b/pinot-plugins/pinot-input-format/pinot-parquet/pom.xml index 62d70ba5ec..2a94606ebc 100644 --- a/pinot-plugins/pinot-input-format/pinot-parquet/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-parquet/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-input-format/pinot-protobuf/pom.xml b/pinot-plugins/pinot-input-format/pinot-protobuf/pom.xml index da6832e869..1e504deafd 100644 --- a/pinot-plugins/pinot-input-format/pinot-protobuf/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-protobuf/pom.xml @@ -37,7 +37,7 @@ <pinot.root>${basedir}/../../..</pinot.root> <kafka.lib.version>2.8.1</kafka.lib.version> <testcontainers.version>1.19.7</testcontainers.version> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <repositories> <repository> diff --git a/pinot-plugins/pinot-input-format/pinot-thrift/pom.xml b/pinot-plugins/pinot-input-format/pinot-thrift/pom.xml index ab2b565f1b..1c746ef3e9 100644 --- a/pinot-plugins/pinot-input-format/pinot-thrift/pom.xml +++ b/pinot-plugins/pinot-input-format/pinot-thrift/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-metrics/pinot-dropwizard/pom.xml b/pinot-plugins/pinot-metrics/pinot-dropwizard/pom.xml index 1fd60542c7..8e67f5bde8 100644 --- a/pinot-plugins/pinot-metrics/pinot-dropwizard/pom.xml +++ b/pinot-plugins/pinot-metrics/pinot-dropwizard/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml b/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml index 46bebe926c..97e2c49ea9 100644 --- a/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml +++ b/pinot-plugins/pinot-metrics/pinot-yammer/pom.xml @@ -34,7 +34,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/pom.xml b/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/pom.xml index 287c832146..a8388d1df1 100644 --- a/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/pom.xml +++ b/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/pom.xml @@ -34,7 +34,6 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>none</phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-segment-uploader/pinot-segment-uploader-default/pom.xml b/pinot-plugins/pinot-segment-uploader/pinot-segment-uploader-default/pom.xml index f104c54178..4104c365dd 100644 --- a/pinot-plugins/pinot-segment-uploader/pinot-segment-uploader-default/pom.xml +++ b/pinot-plugins/pinot-segment-uploader/pinot-segment-uploader-default/pom.xml @@ -35,7 +35,6 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>none</phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-segment-writer/pinot-segment-writer-file-based/pom.xml b/pinot-plugins/pinot-segment-writer/pinot-segment-writer-file-based/pom.xml index 697d952d66..c064b4f35f 100644 --- a/pinot-plugins/pinot-segment-writer/pinot-segment-writer-file-based/pom.xml +++ b/pinot-plugins/pinot-segment-writer/pinot-segment-writer-file-based/pom.xml @@ -35,7 +35,6 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>none</phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/pom.xml b/pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/pom.xml index 533e18f90e..168001f16f 100644 --- a/pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/pom.xml +++ b/pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/pom.xml @@ -36,7 +36,7 @@ <properties> <pinot.root>${basedir}/../../..</pinot.root> <kafka.lib.version>2.8.1</kafka.lib.version> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> diff --git a/pinot-plugins/pinot-stream-ingestion/pinot-kafka-base/pom.xml b/pinot-plugins/pinot-stream-ingestion/pinot-kafka-base/pom.xml index c3d663f064..1c34237eb6 100644 --- a/pinot-plugins/pinot-stream-ingestion/pinot-kafka-base/pom.xml +++ b/pinot-plugins/pinot-stream-ingestion/pinot-kafka-base/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> </properties> <dependencies> <dependency> diff --git a/pinot-plugins/pinot-stream-ingestion/pinot-kinesis/pom.xml b/pinot-plugins/pinot-stream-ingestion/pinot-kinesis/pom.xml index 919bd1d19e..916a617504 100644 --- a/pinot-plugins/pinot-stream-ingestion/pinot-kinesis/pom.xml +++ b/pinot-plugins/pinot-stream-ingestion/pinot-kinesis/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> <pinot.root>${basedir}/../../..</pinot.root> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> <reactive.version>1.0.2</reactive.version> <localstack-utils.version>0.2.23</localstack-utils.version> </properties> @@ -133,69 +133,4 @@ </dependency> </dependencies> - <profiles> - <profile> - <id>build-shaded-jar</id> - <activation> - <property> - <name>skipShade</name> - <value>!true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <version>3.2.1</version> - <executions> - <execution> - <phase>${phase.prop}</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <!-- combine.self="override" needs to be specified as without this attribute child pom appears to merge - shade plugin configurations in its parents pom.Notably the shade plugin configuration in the root pom declares a mainClass which - causes the build to fail - https://github.com/apache/pinot/blob/master/pom.xml#L1880 - The build will fail with the message "Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.2.1:shade - for parameter mainClass: Cannot find 'mainClass' in class org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" error - Adding "combine.self" attribute in the child pom's configuration will allow maven to execute the shade plugin independently from the - parent pom. For more details please see https://github.com/stevenschlansker/maven-configure-transformer-bug & - https://mail-archives.apache.org/mod_mbox/maven-issues/201605.mbox/%3cjira.12964833.1462316804000.103574.1462316952...@atlassian.jira%3E - --> - <transformers combine.self="override"> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> - </transformers> - <!-- - Usually in hadoop environment, there are multiple jars with different versions. - Most of the NoSuchMethodExceptions are caused by class loading conflicts. - Class relocation ensures the reference of certain packages/classes in Pinot code to - shaded libs, e.g. jackson or guava. - Ref: https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html - --> - <relocations> - <relocation> - <pattern>com.google.common</pattern> - <shadedPattern>${shade.prefix}.com.google.common</shadedPattern> - </relocation> - <relocation> - <pattern>com.fasterxml.jackson</pattern> - <shadedPattern>${shade.prefix}.com.fasterxml.jackson</shadedPattern> - </relocation> - <relocation> - <pattern>software.amazon</pattern> - <shadedPattern>${shade.prefix}.software.amazon</shadedPattern> - </relocation> - </relocations> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/pinot-plugins/pinot-stream-ingestion/pinot-pulsar/pom.xml b/pinot-plugins/pinot-stream-ingestion/pinot-pulsar/pom.xml index 2037493483..f742f52f45 100644 --- a/pinot-plugins/pinot-stream-ingestion/pinot-pulsar/pom.xml +++ b/pinot-plugins/pinot-stream-ingestion/pinot-pulsar/pom.xml @@ -35,7 +35,7 @@ <url>https://pinot.apache.org/</url> <properties> - <phase.prop>package</phase.prop> + <shade.phase.prop>package</shade.phase.prop> <pinot.root>${basedir}/../../..</pinot.root> <simpleclient_common.version>0.16.0</simpleclient_common.version> <grpc-context.version>1.63.0</grpc-context.version> diff --git a/pinot-plugins/pom.xml b/pinot-plugins/pom.xml index 57e66ca0fd..f3e9d02d9b 100644 --- a/pinot-plugins/pom.xml +++ b/pinot-plugins/pom.xml @@ -36,7 +36,6 @@ <properties> <pinot.root>${basedir}/..</pinot.root> <plugin.type/> - <phase.prop>none</phase.prop> <hadoop.dependencies.scope>compile</hadoop.dependencies.scope> </properties> @@ -83,77 +82,5 @@ <hadoop.dependencies.scope>provided</hadoop.dependencies.scope> </properties> </profile> - <profile> - <id>build-shaded-jar</id> - <activation> - <property> - <name>skipShade</name> - <value>!true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <version>3.2.1</version> - <executions> - <execution> - <phase>${phase.prop}</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> - </transformers> - <!-- - Usually in hadoop environment, there are multiple jars with different versions. - Most of the NoSuchMethodExceptions are caused by class loading conflicts. - Class relocation ensures the reference of certain packages/classes in Pinot code to - shaded libs, e.g. jackson or guava. - Ref: https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html - --> - <relocations> - <relocation> - <pattern>com.google.common</pattern> - <shadedPattern>${shade.prefix}.com.google.common</shadedPattern> - </relocation> - <relocation> - <pattern>com.fasterxml.jackson</pattern> - <shadedPattern>${shade.prefix}.com.fasterxml.jackson</shadedPattern> - </relocation> - <relocation> - <pattern>org.apache.http</pattern> - <shadedPattern>${shade.prefix}.org.apache.http</shadedPattern> - </relocation> - <relocation> - <pattern>software.amazon</pattern> - <shadedPattern>${shade.prefix}.software.amazon</shadedPattern> - </relocation> - <relocation> - <pattern>org.reflections</pattern> - <shadedPattern>${shade.prefix}.org.reflections</shadedPattern> - </relocation> - <relocation> - <pattern>io.netty</pattern> - <shadedPattern>${shade.prefix}.io.netty</shadedPattern> - </relocation> - <relocation> - <pattern>org.apache.parquet</pattern> - <shadedPattern>${shade.prefix}.org.apache.parquet</shadedPattern> - </relocation> - <relocation> - <pattern>org.apache.kafka</pattern> - <shadedPattern>${shade.prefix}.org.apache.kafka</shadedPattern> - </relocation> - </relocations> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> </profiles> </project> diff --git a/pinot-spi/pom.xml b/pinot-spi/pom.xml index d1c76c9e88..43ae753a6d 100644 --- a/pinot-spi/pom.xml +++ b/pinot-spi/pom.xml @@ -179,39 +179,4 @@ <artifactId>reflections</artifactId> </dependency> </dependencies> - <profiles> - <profile> - <id>build-shaded-jar</id> - <activation> - <activeByDefault>false</activeByDefault> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <relocations> - <relocation> - <pattern>com.google.common.base</pattern> - <shadedPattern>${shade.prefix}.com.google.common.base</shadedPattern> - </relocation> - <relocation> - <pattern>com.fasterxml.jackson</pattern> - <shadedPattern>${shade.prefix}.com.fasterxml.jackson</shadedPattern> - </relocation> - </relocations> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/pom.xml b/pom.xml index e1714b98ef..67c437975f 100644 --- a/pom.xml +++ b/pom.xml @@ -131,6 +131,8 @@ <!-- Configuration for Packaging --> <shade.prefix>org.apache.pinot.shaded</shade.prefix> <maven-jar-plugin.version>3.4.0</maven-jar-plugin.version> + <maven-shade-plugin.version>3.5.2</maven-shade-plugin.version> + <shade.phase.prop>none</shade.phase.prop> <avro.version>1.11.3</avro.version> <parquet.version>1.13.1</parquet.version> @@ -2215,6 +2217,9 @@ <!-- Exclude build targets --> <exclude>**/target/**</exclude> + <!-- Exclude Maven plugin generated files --> + <exclude>**/dependency-reduced-pom.xml</exclude> + <!-- Text and log files --> <exclude>**/*.txt</exclude> <exclude>**/*.log</exclude> @@ -2305,10 +2310,20 @@ </plugin> <plugin> <artifactId>maven-shade-plugin</artifactId> - <version>3.2.1</version> + <version>${maven-shade-plugin.version}</version> + <executions> + <execution> + <phase>${shade.phase.prop}</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> + <createDependencyReducedPom>false</createDependencyReducedPom> <transformers> + <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>${mainClass}</mainClass> @@ -2329,6 +2344,40 @@ </excludes> </filter> </filters> + <relocations> + <relocation> + <pattern>com.fasterxml.jackson</pattern> + <shadedPattern>${shade.prefix}.com.fasterxml.jackson</shadedPattern> + </relocation> + <relocation> + <pattern>com.google.common</pattern> + <shadedPattern>${shade.prefix}.com.google.common</shadedPattern> + </relocation> + <relocation> + <pattern>io.netty</pattern> + <shadedPattern>${shade.prefix}.io.netty</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.http</pattern> + <shadedPattern>${shade.prefix}.org.apache.http</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.kafka</pattern> + <shadedPattern>${shade.prefix}.org.apache.kafka</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.parquet</pattern> + <shadedPattern>${shade.prefix}.org.apache.parquet</shadedPattern> + </relocation> + <relocation> + <pattern>org.reflections</pattern> + <shadedPattern>${shade.prefix}.org.reflections</shadedPattern> + </relocation> + <relocation> + <pattern>software.amazon</pattern> + <shadedPattern>${shade.prefix}.software.amazon</shadedPattern> + </relocation> + </relocations> </configuration> </plugin> <!-- Include apache LICENSE, NOTICE files for jar resource bundle --> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org