| <!-- |
| |
| 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.pulsar.examples</groupId> |
| <artifactId>pulsar-examples</artifactId> |
| <version>2.6.3</version> |
| </parent> |
| |
| <groupId>org.apache.pulsar.examples</groupId> |
| <artifactId>flink</artifactId> |
| <name>Pulsar Examples :: Flink</name> |
| |
| <properties> |
| <maven.compiler.target>1.8</maven.compiler.target> |
| <maven.compiler.source>1.8</maven.compiler.source> |
| <log4j2.version>2.10.0</log4j2.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-api</artifactId> |
| <version>${log4j2.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-core</artifactId> |
| <version>${log4j2.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-slf4j-impl</artifactId> |
| <version>${log4j2.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-streaming-scala_${scala.binary.version}</artifactId> |
| <version>${flink.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.flink</groupId> |
| <artifactId>flink-table_${scala.binary.version}</artifactId> |
| <version>${flink.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.pulsar</groupId> |
| <artifactId>pulsar-flink</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| |
| </dependencies> |
| |
| <build> |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>pulsar-flink-examples</id> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <shadeTestJar>false</shadeTestJar> |
| <shadedArtifactAttached>false</shadedArtifactAttached> |
| <createDependencyReducedPom>false</createDependencyReducedPom> |
| <transformers> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| <mainClass>org.apache.flink.streaming.connectors.pulsar.example.PulsarConsumerSourceWordCount</mainClass> |
| </transformer> |
| </transformers> |
| <finalName>pulsar-flink-examples</finalName> |
| <filters> |
| <filter> |
| <artifact>*</artifact> |
| <includes> |
| <include>org/apache/flink/streaming/examples/kafka/**</include> |
| <include>org/apache/flink/streaming/**</include> |
| <include>org/apache/pulsar/**</include> |
| <include>org/bouncycastle/**</include> |
| <include>org/apache/flink/batch/**</include> |
| <include>net/jpountz/**</include> |
| <include>com/scurrilous/circe/**</include> |
| <include>org/apache/commons/csv/**</include> |
| <include>org/apache/flink/avro/generated/**</include> |
| <include>org/apache/avro/**</include> |
| <include>org/codehaus/jackson/**</include> |
| <include>avro/shaded/com/google/common/**</include> |
| <include>org/apache/flink/formats/avro/**</include> |
| </includes> |
| </filter> |
| </filters> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Scala Plugin to compile Scala Files --> |
| <plugin> |
| <groupId>net.alchim31.maven</groupId> |
| <artifactId>scala-maven-plugin</artifactId> |
| <version>4.1.0</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>compile</goal> |
| <goal>add-source</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Generate Test class from avro schema --> |
| <plugin> |
| <groupId>org.apache.avro</groupId> |
| <artifactId>avro-maven-plugin</artifactId> |
| <version>${avro.version}</version> |
| <executions> |
| <execution> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>schema</goal> |
| </goals> |
| <configuration> |
| <testSourceDirectory>${project.basedir}/src/main/resources/avro</testSourceDirectory> |
| <testOutputDirectory>${project.basedir}/src/main/java/</testOutputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </project> |