blob: c74b3e4afad496faa37748d3d075386335159483 [file] [log] [blame]
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.flink</groupId>
<artifactId>flink-contrib</artifactId>
<version>1.0.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>flink-storm-examples_2.10</artifactId>
<name>flink-storm-examples</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-storm_2.10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-batch_2.10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.10</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils_2.10</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-starter</artifactId>
<version>0.9.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- get default data from flink-example-batch package -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.9</version><!--$NO-MVN-MAN-VER$-->
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.flink</groupId>
<artifactId>flink-examples-batch_2.10</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<includes>org/apache/flink/examples/java/wordcount/util/WordCountData.class</includes>
</artifactItem>
<artifactItem>
<groupId>org.apache.flink</groupId>
<artifactId>flink-storm_2.10</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>0.9.4</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<!-- need to exclude to be able to run
* StormWordCountRemoteByClient and
* StormWordCountRemoteBySubmitter
within Eclipse -->
<excludes>defaults.yaml</excludes>
</artifactItem>
<artifactItem>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.11</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- self-contained jars for each example -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<!-- WordCount Spout source-->
<!-- example for embedded spout - for whole topologies see "WordCount Storm topology" example below -->
<execution>
<id>WordCount-SpoutSource</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<finalName>WordCount</finalName>
<classifier>SpoutSource</classifier>
<archive>
<manifestEntries>
<program-class>org.apache.flink.storm.wordcount.SpoutSourceWordCount</program-class>
</manifestEntries>
</archive>
<includes>
<!-- from storm-core -->
<include>backtype/storm/topology/*.class</include>
<include>backtype/storm/spout/*.class</include>
<include>backtype/storm/task/*.class</include>
<include>backtype/storm/tuple/*.class</include>
<include>backtype/storm/generated/*.class</include>
<include>backtype/storm/metric/**/*.class</include>
<include>org/apache/thrift7/**/*.class</include>
<!-- Storm's recursive dependencies -->
<include>org/json/simple/**/*.class</include>
<!-- compatibility layer -->
<include>org/apache/flink/storm/api/*.class</include>
<include>org/apache/flink/storm/util/*.class</include>
<include>org/apache/flink/storm/wrappers/*.class</include>
<!-- Word Count -->
<include>org/apache/flink/storm/wordcount/SpoutSourceWordCount.class</include>
<include>org/apache/flink/storm/wordcount/SpoutSourceWordCount$*.class</include>
<include>org/apache/flink/storm/wordcount/operators/WordCountFileSpout.class</include>
<include>org/apache/flink/storm/wordcount/operators/WordCountInMemorySpout.class</include>
<include>org/apache/flink/storm/util/AbstractLineSpout.class</include>
<include>org/apache/flink/storm/util/FileSpout.class</include>
<include>org/apache/flink/storm/util/InMemorySpout.class</include>
<include>org/apache/flink/examples/java/wordcount/util/WordCountData.class</include>
</includes>
</configuration>
</execution>
<!-- WordCount Bolt tokenizer-->
<!-- example for embedded bolt - for whole topologies see "WordCount Storm topology" example below -->
<execution>
<id>WordCount-BoltTokenizer</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<finalName>WordCount</finalName>
<classifier>BoltTokenizer</classifier>
<archive>
<manifestEntries>
<program-class>org.apache.flink.storm.wordcount.BoltTokenizerWordCount</program-class>
</manifestEntries>
</archive>
<includes>
<!-- from storm-core -->
<include>backtype/storm/topology/*.class</include>
<include>backtype/storm/spout/*.class</include>
<include>backtype/storm/task/*.class</include>
<include>backtype/storm/tuple/*.class</include>
<include>backtype/storm/generated/*.class</include>
<include>backtype/storm/metric/**/*.class</include>
<include>org/apache/thrift7/**/*.class</include>
<!-- Storm's recursive dependencies -->
<include>org/json/simple/**/*.class</include>
<!-- compatibility layer -->
<include>org/apache/flink/storm/api/*.class</include>
<include>org/apache/flink/storm/util/*.class</include>
<include>org/apache/flink/storm/wrappers/*.class</include>
<!-- Word Count -->
<include>org/apache/flink/storm/wordcount/BoltTokenizerWordCount.class</include>
<include>org/apache/flink/storm/wordcount/operators/BoltTokenizer.class</include>
<include>org/apache/flink/examples/java/wordcount/util/WordCountData.class</include>
</includes>
</configuration>
</execution>
<!-- WordCount Storm topology-->
<!-- Example for whole topologies (ie, if FlinkTopology is used) -->
<!-- We cannot use maven-jar-plugin because 'defaults.yaml' must be included in jar.
However, we excluded 'defaults.yaml' in dependency-plugin to get clean Eclipse environment.
Thus, 'defaults.yaml' is not available for maven-jar-plugin.
Nevertheless, we register an empty jar with corresponding name, such that the final jar can be installed to local maven repository.
We use maven-shade-plugin to build the actual jar (which will replace the empty jar). -->
<execution>
<id>WordCount-StormTopology</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<finalName>WordCount</finalName>
<classifier>StormTopology</classifier>
</configuration>
</execution>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- WordCount Storm topology-->
<!-- Cannot use maven-jar-plugin because 'defaults.yaml' must be included in jar -->
<!-- Build StormTopolgy jar to overwrite empty jar created with maven-jar-plugin. -->
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<executions>
<execution>
<id>WordCount-StormTopology</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>WordCount-StormTopology</finalName>
<artifactSet>
<includes>
<include>org.apache.storm:storm-core</include>
<!-- Storm's recursive dependencies -->
<include>org.yaml:snakeyaml</include>
<include>com.googlecode.json-simple:json-simple</include>
<include>org.apache.flink:flink-storm_2.10</include>
<include>org.apache.flink:flink-storm-examples_2.10</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>org.apache.storm:storm-core</artifact>
<includes>
<include>defaults.yaml</include>
<include>backtype/storm/*.class</include>
<include>backtype/storm/topology/*.class</include>
<include>backtype/storm/spout/*.class</include>
<include>backtype/storm/task/*.class</include>
<include>backtype/storm/tuple/*.class</include>
<include>backtype/storm/generated/*.class</include>
<include>backtype/storm/metric/**/*.class</include>
<include>backtype/storm/utils/*.class</include>
<include>backtype/storm/serialization/*.class</include>
<include>org/apache/storm/curator/**/*.class</include>
<include>org/apache/thrift7/**/*.class</include>
<!-- Storm's recursive dependencies -->
<include>org/json/simple/**/*.class</include>
<include>org/yaml/snakeyaml/**/*.class</include>
</includes>
</filter>
<filter>
<artifact>org.apache.flink:flink-storm-examples_2.10</artifact>
<includes>
<include>org/apache/flink/storm/wordcount/WordCountRemoteBySubmitter.class</include>
<include>org/apache/flink/storm/wordcount/WordCountTopology.class</include>
<include>org/apache/flink/storm/wordcount/operators/*.class</include>
<include>org/apache/flink/storm/util/*.class</include>
<include>org/apache/flink/examples/java/wordcount/util/WordCountData.class</include>
</includes>
</filter>
<filter>
<artifact>org.apache.flink:flink-storm_2.10</artifact>
<includes>
<include>org/apache/flink/storm/api/*.class</include>
<include>org/apache/flink/storm/util/*.class</include>
<include>org/apache/flink/storm/wrappers/*.class</include>
</includes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.apache.flink.storm.wordcount.WordCountRemoteBySubmitter</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.9,)</versionRange>
<goals>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>