<?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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.solwind</groupId>
    <artifactId>distributed-service-injector</artifactId>
    <version>0.0.2</version>
    <packaging>jar</packaging>

    <name>distributed-service-injector</name>

    <scm>
        <connection>scm:git:https://github.com/thesolwind/distributed-service-injector</connection>
        <developerConnection>scm:git:https://github.com/thesolwind/distributed-service-injector</developerConnection>
        <tag>distributed-service-injector-0.0.2</tag>
        <url>https://github.com/thesolwind/distributed-service-injector</url>
    </scm>

    <description>This library allows you to easy create communication between different services which run on different hosts.
        It uses the Apache zookeeper to find location of services, the netty io to connnect
        beatween services and java serialization to serialize queries beatween services.
    </description>
    <url>http://io.solwind</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>thesolwind</id>
            <name>Alexandr Yemits</name>
            <email>thesolwind@gmail.com</email>
            <url>http://io.solwind</url>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>Europe/Kiev</timezone>
        </developer>
    </developers>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <sonar.junit.reportsPath>target/surefire-reports</sonar.junit.reportsPath>
        <sonar.cobertura.reportPath>target/site/cobertura/coverage.xml</sonar.cobertura.reportPath>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.0.4.Final</version>
        </dependency>
        <dependency>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
            <version>3.4.10</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>2.0.2-beta</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-test</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </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>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <quiet>true</quiet>
                    <formats>
                        <format>xml</format>
                        <format>html</format>
                    </formats>
                    <instrumentation>
                        <ignoreTrivial>true</ignoreTrivial>
                        <excludes>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorClient.class</exclude>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorServer.class</exclude>
                            <exclude>io/solwind/impl/ZookeeperDiscoveryConnector.class</exclude>
                            <exclude>io/solwind/impl/ZookeeperDiscoveryConnector$ZooKeeperClient.class</exclude>
                            <exclude>io/solwind/impl/ZookeeperDiscoveryConnector$1.class</exclude>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorServer$1.class</exclude>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorClient$1.class</exclude>
                        </excludes>
                    </instrumentation>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>cobertura</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <instrumentation>
                        <excludes>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorClient.class</exclude>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorServer.class</exclude>
                            <exclude>io/solwind/impl/ZookeeperDiscoveryConnector.class</exclude>
                            <exclude>io/solwind/impl/ZookeeperDiscoveryConnector$ZooKeeperClient.class</exclude>
                            <exclude>io/solwind/impl/ZookeeperDiscoveryConnector$1.class</exclude>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorServer$1.class</exclude>
                            <exclude>io/solwind/impl/NettyIoRmiConnectorClient$1.class</exclude>
                        </excludes>
                    </instrumentation>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                    <check />
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>