<?xml version="1.0" encoding="UTF-8"?>
<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">
    <parent>
        <artifactId>scotty</artifactId>
        <groupId>stream.scotty</groupId>
        <version>0.4</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>storm-connector</artifactId>

    <properties>
        <jdk.version>1.8</jdk.version>
        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <maven-shade-plugin.version>3.1.0</maven-shade-plugin.version>
        <scotty.version>0.4</scotty.version>
        <storm.version>1.2.3</storm.version>
        <args4j.version>2.33</args4j.version>
    </properties>

    <dependencies>
        <!-- Scotty Dependencies -->
        <dependency>
            <groupId>stream.scotty</groupId>
            <artifactId>core</artifactId>
            <version>${scotty.version}</version>
        </dependency>
        <dependency>
            <groupId>stream.scotty</groupId>
            <artifactId>slicing</artifactId>
            <version>${scotty.version}</version>
        </dependency>
        <dependency>
            <groupId>stream.scotty</groupId>
            <artifactId>state</artifactId>
            <version>${scotty.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.storm/storm-core -->
        <dependency>
            <groupId>org.apache.storm</groupId>
            <artifactId>storm-core</artifactId>
            <version>${storm.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- Set a compiler level -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>

            <!--
              Configures `mvn package` to produce a bundled jar ("fat jar")
              that require this for job submission to a cluster.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>${maven-shade-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <finalName>${project.artifactId}-bundled-${project.version}</finalName>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/LICENSE</exclude>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <transformers>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>