<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-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>biz.paluch.redis</groupId>
    <artifactId>lettuce</artifactId>
    <version>4.0.Beta2</version>
    <packaging>jar</packaging>

    <name>lettuce</name>
    <url>http://github.com/mp911de/lettuce/wiki</url>
    <description>Advanced and thread-safe Java Redis client for synchronous, asynchronous, and
        reactive usage. Supports Cluster, Sentinel, Pipelining, Auto-Reconnect, Codecs
        and much more.
    </description>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/mp911de/lettuce</url>
    </ciManagement>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/mp911de/lettuce/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <id>will</id>
            <name>Will Glozer</name>
        </developer>
        <developer>
            <id>mp911de</id>
            <name>Mark Paluch</name>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- Not every build should be signed, disabled by default -->
        <skipSigning>true</skipSigning>
        <!-- You need a running redis+sentinel for all tests, therefore disabled by default -->
        <skipTests>true</skipTests>
        <github.site.upload.skip>true</github.site.upload.skip>
        <lettuce-release-version>3.2.Final</lettuce-release-version>
        <netty-version>4.0.30.Final</netty-version>
    </properties>

    <scm>
        <connection>scm:git:https://github.com/mp911de/lettuce.git</connection>
        <developerConnection>scm:git:https://github.com/mp911de/lettuce.git</developerConnection>
        <url>http://github.com/mp911de/lettuce</url>
        <tag>4.0.Beta2</tag>
    </scm>

    <prerequisites>
        <maven>3.0</maven>
    </prerequisites>

    <dependencies>

        <dependency>
            <groupId>io.reactivex</groupId>
            <artifactId>rxjava</artifactId>
            <version>1.0.14</version>
        </dependency>

        <!-- Netty -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-common</artifactId>
            <version>${netty-version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport</artifactId>
            <version>${netty-version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
            <version>${netty-version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-epoll</artifactId>
            <version>${netty-version}</version>
            <classifier>linux-x86_64</classifier>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>18.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>2.4.2</version>
        </dependency>

        <!-- Spring/CDI -->

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>4.2.0.RELEASE</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.2.0.RELEASE</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.0</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <!-- Test -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.tempus-fugit</groupId>
            <artifactId>tempus-fugit</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.openwebbeans.test</groupId>
            <artifactId>cditest-owb</artifactId>
            <version>1.2.8</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.1.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>4.2.0.RELEASE</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>4.2.0.RELEASE</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.github.javaparser</groupId>
            <artifactId>javaparser-core</artifactId>
            <version>2.2.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>src</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <finalName>${project.artifactId}-${project.version}</finalName>
                                    <descriptors>
                                        <descriptor>src/assembly/src.xml</descriptor>
                                    </descriptors>
                                    <tarLongFileMode>gnu</tarLongFileMode>
                                    <attach>false</attach>
                                </configuration>
                            </execution>
                            <execution>
                                <id>bin</id>
                                <configuration>
                                    <finalName>${project.artifactId}-${project.version}</finalName>
                                    <descriptors>
                                        <descriptor>src/assembly/bin.xml</descriptor>
                                    </descriptors>
                                    <tarLongFileMode>gnu</tarLongFileMode>
                                    <attach>false</attach>
                                </configuration>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>net.ju-n.maven.plugins</groupId>
                        <artifactId>checksum-maven-plugin</artifactId>
                        <version>1.2</version>
                        <configuration>
                            <algorithms>
                                <algorithm>MD5</algorithm>
                                <algorithm>SHA-1</algorithm>
                            </algorithms>
                        </configuration>

                        <executions>
                            <execution>
                                <id>artifacts</id>
                                <goals>
                                    <goal>artifacts</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>

                            <execution>
                                <id>files</id>
                                <goals>
                                    <goal>files</goal>
                                </goals>
                                <phase>package</phase>
                                <configuration>
                                    <fileSets>
                                        <fileSet>
                                            <directory>${project.build.directory}</directory>
                                            <includes>
                                                <include>*.gz</include>
                                                <include>*.zip</include>
                                            </includes>
                                        </fileSet>
                                    </fileSets>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <compilerArgument>-Xlint:all,-deprecation,-unchecked</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>false</showDeprecation>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <level>public</level>
                    <links>
                        <link>http://netty.io/4.0/api/</link>
                        <link>http://commons.apache.org/proper/commons-pool/api-2.4.2/</link>
                        <link>http://docs.guava-libraries.googlecode.com/git/javadoc/</link>
                        <link>http://reactivex.io/RxJava/javadoc/</link>
                    </links>
                    <additionalparam>-Xdoclint:all -Xdoclint:-html</additionalparam>
                    <tags>
                        <tag>
                            <name>generated</name>
                            <placement>a</placement>
                            <head>Generated class:</head>
                        </tag>
                    </tags>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <systemProperties>
                        <io.netty.eventLoopThreads>4</io.netty.eventLoopThreads>
                    </systemProperties>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <releaseProfiles>sonatype-oss-release</releaseProfiles>
                    <arguments>-DskipSigning=false</arguments>
                    <goals>deploy</goals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <skip>${skipSigning}</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.5.201505241946</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>
                <configuration>
                    <relativizeDecorationLinks>false</relativizeDecorationLinks>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>1.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <scmBranch>gh-pages</scmBranch>
                    <content>${project.build.directory}/site</content>
                    <skipCheckin>${github.site.upload.skip}</skipCheckin>
                    <skipDeletedFiles>true</skipDeletedFiles>
                    <pubScmUrl>scm:git:ssh://git@github.com/mp911de/redis.paluch.biz.git</pubScmUrl>
                    <excludes>apidocs/**</excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>
                                    <artifact>com.google.guava:guava</artifact>
                                    <excludes>
                                        <exclude>com/google/common/cache/**</exclude>
                                        <exclude>com/google/common/escape/**</exclude>
                                        <exclude>com/google/common/eventbus/**</exclude>
                                        <exclude>com/google/common/hash/**</exclude>
                                        <exclude>com/google/common/html/**</exclude>
                                        <exclude>com/google/common/math/**</exclude>
                                        <exclude>com/google/common/xml/**</exclude>
                                    </excludes>
                                </filter>
                            </filters>

                            <relocations>
                                <relocation>
                                    <pattern>io.reactivex</pattern>
                                    <shadedPattern>com.lambdaworks.io.reactivex</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.google</pattern>
                                    <shadedPattern>com.lambdaworks.com.google</shadedPattern>
                                </relocation>

                                <relocation>
                                    <pattern>org.apache</pattern>
                                    <shadedPattern>com.lambdaworks.org.apache</shadedPattern>
                                </relocation>

                                <relocation>
                                    <pattern>io.netty</pattern>
                                    <shadedPattern>com.lambdaworks.io.netty</shadedPattern>
                                </relocation>
                            </relocations>
                            <minimizeJar>false</minimizeJar>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>plugin-management</report>
                            <report>distribution-management</report>
                            <report>dependency-info</report>
                            <report>dependencies</report>
                            <report>scm</report>
                            <report>issue-tracking</report>
                            <report>cim</report>
                            <report>dependency-management</report>
                            <report>project-team</report>
                            <report>summary</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
