| <?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> |
| <artifactId>pinot-stream-ingestion</artifactId> |
| <groupId>org.apache.pinot</groupId> |
| <version>0.12.1</version> |
| <relativePath>..</relativePath> |
| </parent> |
| |
| <artifactId>pinot-kafka-0.9</artifactId> |
| <name>Pinot Kafka 0.9</name> |
| <url>https://pinot.apache.org/</url> |
| <properties> |
| <pinot.root>${basedir}/../../..</pinot.root> |
| <kafka.lib.version>0.9.0.1</kafka.lib.version> |
| <kafka.scala.version>2.10</kafka.scala.version> |
| <phase.prop>package</phase.prop> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.pinot</groupId> |
| <artifactId>pinot-kafka-base</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <!-- Kafka --> |
| <dependency> |
| <groupId>org.apache.kafka</groupId> |
| <artifactId>kafka_2.10</artifactId> |
| <version>${kafka.lib.version}</version> |
| <exclusions> |
| <exclusion> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-log4j12</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>net.sf.jopt-simple</groupId> |
| <artifactId>jopt-simple</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>org.scala-lang</groupId> |
| <artifactId>scala-library</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>org.scala-lang</groupId> |
| <artifactId>scala-library</artifactId> |
| <version>2.10.5</version> |
| </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> |
| <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}.kafka09.org.apache.kafka</shadedPattern> |
| </relocation> |
| <relocation> |
| <pattern>kafka</pattern> |
| <shadedPattern>${shade.prefix}.kafka09.kafka</shadedPattern> |
| </relocation> |
| <relocation> |
| <pattern>scala</pattern> |
| <shadedPattern>${shade.prefix}.scala_2_10</shadedPattern> |
| </relocation> |
| </relocations> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |