<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>com.github.groupon.monsoon</groupId>
        <artifactId>monsoon-basepom</artifactId>
        <version>2.3.1</version>
    </parent>
    <artifactId>monsoon-history</artifactId>
    <packaging>jar</packaging>
    <name>Mon-soon history module</name>
    <url>https://github.com/groupon/monsoon</url>

    <scm>
        <connection>scm:git:github.com:groupon/monsoon.git</connection>
        <developerConnection>scm:git:github.com:groupon/monsoon.git</developerConnection>
        <url>https://github.com/groupon/monsoon</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.targetJdk>1.8</project.build.targetJdk>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.github.groupon.monsoon</groupId>
            <artifactId>monsoon-collector-base</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.groupon.monsoon</groupId>
            <artifactId>monsoon-impl-intf</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.8</version>
        </dependency>
        <dependency>
            <groupId>org.acplt.remotetea</groupId>
            <artifactId>remotetea-oncrpc</artifactId>
            <version>${remotetea.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sf.trove4j</groupId>
            <artifactId>trove4j</artifactId>
            <version>3.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.anarres.lzo</groupId>
            <artifactId>lzo-core</artifactId>
            <version>1.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.iq80.snappy</groupId>
            <artifactId>snappy</artifactId>
            <version>0.4</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerReuseStrategy>alwaysNew</compilerReuseStrategy>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <source>1.8</source>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>createXdrGeneratedSourcesDir</id>
                        <phase>initialize</phase>
                        <configuration>
                            <tasks>
                                <mkdir dir="${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/xdr" />
                                <mkdir dir="${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/v0/xdr" />
                                <mkdir dir="${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/v1/xdr" />
                                <mkdir dir="${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/v2/xdr" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.5.0</version>
                <executions>
                    <execution>
                        <id>generate XDR encoder/decoder for mimetype</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>org.acplt.oncrpc.apps.jrpcgen.jrpcgen</mainClass>
                            <includePluginDependencies>true</includePluginDependencies>
                            <includeProjectDependencies>false</includeProjectDependencies>
                            <classpathScope>system</classpathScope>
                            <executableDependency>
                                <groupId>org.acplt.remotetea</groupId>
                                <artifactId>remotetea-jrpcgen</artifactId>
                            </executableDependency>
                            <arguments>
                                <argument>-d</argument><argument>${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/xdr</argument>
                                <argument>-p</argument><argument>com.groupon.lex.metrics.history.xdr</argument>
                                <argument>-nobackup</argument>
                                <argument>-noclient</argument>
                                <argument>-noserver</argument>
                                <argument>${project.basedir}/src/main/xdr/tsdata_mime.x</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate XDR encoder/decoder for history files 0.0</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>org.acplt.oncrpc.apps.jrpcgen.jrpcgen</mainClass>
                            <includePluginDependencies>true</includePluginDependencies>
                            <includeProjectDependencies>false</includeProjectDependencies>
                            <classpathScope>system</classpathScope>
                            <executableDependency>
                                <groupId>org.acplt.remotetea</groupId>
                                <artifactId>remotetea-jrpcgen</artifactId>
                            </executableDependency>
                            <arguments>
                                <argument>-d</argument><argument>${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/v0/xdr</argument>
                                <argument>-p</argument><argument>com.groupon.lex.metrics.history.v0.xdr</argument>
                                <argument>-nobackup</argument>
                                <argument>-noclient</argument>
                                <argument>-noserver</argument>
                                <argument>${project.basedir}/src/main/xdr/tsdata_0_0.x</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate XDR encoder/decoder for history files 1.0</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>org.acplt.oncrpc.apps.jrpcgen.jrpcgen</mainClass>
                            <includePluginDependencies>true</includePluginDependencies>
                            <includeProjectDependencies>false</includeProjectDependencies>
                            <classpathScope>system</classpathScope>
                            <executableDependency>
                                <groupId>org.acplt.remotetea</groupId>
                                <artifactId>remotetea-jrpcgen</artifactId>
                            </executableDependency>
                            <arguments>
                                <argument>-d</argument><argument>${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/v1/xdr</argument>
                                <argument>-p</argument><argument>com.groupon.lex.metrics.history.v1.xdr</argument>
                                <argument>-nobackup</argument>
                                <argument>-noclient</argument>
                                <argument>-noserver</argument>
                                <argument>${project.basedir}/src/main/xdr/tsdata_1_0.x</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate XDR encoder/decoder for history files 2.0</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>org.acplt.oncrpc.apps.jrpcgen.jrpcgen</mainClass>
                            <includePluginDependencies>true</includePluginDependencies>
                            <includeProjectDependencies>false</includeProjectDependencies>
                            <classpathScope>system</classpathScope>
                            <executableDependency>
                                <groupId>org.acplt.remotetea</groupId>
                                <artifactId>remotetea-jrpcgen</artifactId>
                            </executableDependency>
                            <arguments>
                                <argument>-d</argument><argument>${project.build.directory}/generated-sources/rpc/com/groupon/lex/metrics/history/v2/xdr</argument>
                                <argument>-p</argument><argument>com.groupon.lex.metrics.history.v2.xdr</argument>
                                <argument>-nobackup</argument>
                                <argument>-noclient</argument>
                                <argument>-noserver</argument>
                                <argument>${project.basedir}/src/main/xdr/tsdata_2_0.x</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.acplt.remotetea</groupId>
                        <artifactId>remotetea-jrpcgen</artifactId>
                        <version>${remotetea.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/rpc</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
