<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed 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.omid</groupId>
        <artifactId>omid</artifactId>
        <version>1.0.2</version>
    </parent>

    <artifactId>omid-tso-server-${hbase.artifactId.suffix}</artifactId>
    <packaging>jar</packaging>
    <name>TSO and TO Servers</name>
    <description>Omid Transaction Status Oracle server and Timestamp Oracle</description>

    <dependencies>

        <!-- Dependencies on Omid modules -->

        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-commit-table</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-common-${hbase.artifactId.suffix}</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.omid</groupId>
                    <artifactId>${shims.exclude.artifactId}</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-commit-table-${hbase.artifactId.suffix}</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.omid</groupId>
                    <artifactId>${shims.exclude.artifactId}</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.omid</groupId>
                    <artifactId>omid-hbase-common-${hbase.exclude.artifactId.suffix}</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-timestamp-storage-${hbase.artifactId.suffix}</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.omid</groupId>
                    <artifactId>${shims.exclude.artifactId}</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.omid</groupId>
                    <artifactId>omid-hbase-common-${hbase.exclude.artifactId.suffix}</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-metrics</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- The codahale-related dependency is added here just to include the jar in the final
        tar.gz package assembled. -->
        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-codahale-metrics</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- The hbase-related dependency is added here just to include the jar in the final tar.gz package assembled.
        The hbase tools are handy to create the required Omid tables from the same script that starts the TSO server -->
        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-tools-${hbase.artifactId.suffix}</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-commit-table</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <classifier>tests</classifier>
        </dependency>
        <dependency>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-transaction-client</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- End of Dependencies on Omid modules -->

        <!-- core -->

        <dependency>
            <groupId>com.lmax</groupId>
            <artifactId>disruptor</artifactId>
            <version>${disruptor.version}</version>
        </dependency>

        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>${guice.version}</version>
        </dependency>

        <!-- end core -->

        <!-- distributed comm -->

        <dependency>
            <groupId>org.jboss.netty</groupId>
            <artifactId>netty</artifactId>
            <version>${netty.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>${protobuf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-framework</artifactId>
            <version>${curator.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-recipes</artifactId>
            <version>${curator.version}</version>
        </dependency>

        <!-- end distributed comm -->

        <!-- storage related -->

        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-client</artifactId>
        </dependency>

        <!-- end storage related -->

        <!-- utils -->

        <dependency>
            <groupId>org.apache.phoenix.thirdparty</groupId>
            <artifactId>phoenix-shaded-guava</artifactId>
            <version>${phoenix.thirdparty.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>${google.findbugs.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>${commons-pool2.version}</version>
        </dependency>

        <!-- end utils -->

        <!-- daemon related -->

        <dependency>
            <groupId>commons-daemon</groupId>
            <artifactId>commons-daemon</artifactId>
            <version>1.0.10</version>
        </dependency>

        <!-- end  daemon related -->

        <!-- logging -->

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>

        <!-- end logging -->

        <!-- testing -->

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-testing-util</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-test</artifactId>
            <version>${curator.version}</version>
            <scope>test</scope>
        </dependency>

        <!--<dependency>-->
            <!--<groupId>org.apache.omid</groupId>-->
            <!--<artifactId>${shims.artifactId}</artifactId>-->
            <!--<version>${project.version}</version>-->
        <!--</dependency>-->
        <!-- end testing -->

    </dependencies>

    <build>

        <plugins>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/lib</outputDirectory>
                            <includeScope>runtime</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${basedir}/lib</directory>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <skipAssembly>false</skipAssembly>
                    <tarLongFileMode>gnu</tarLongFileMode>
                    <descriptors>
                        <descriptor>maven/assembly/bin.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Disable maven site plugin -->
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

        </plugins>

    </build>


</project>
