<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2018. AxonIQ
  ~ 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.axoniq</groupId>
    <artifactId>axonhub-client-parent</artifactId>
    <version>1.0.2</version>

    <packaging>pom</packaging>

    <name>AxonIQ AxonHub Client modules</name>
    <description>
        Clients module for the AxonIQ modules (AxonHub).
    </description>

    <prerequisites>
        <maven>3.0.0</maven>
    </prerequisites>

    <inceptionYear>2018</inceptionYear>
    <url>https://www.axoniq.io</url>
    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/AxonIQ/axoniq-axonhub-client/issues</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>

        <axon.version>3.2.1</axon.version>
        <swagger.version>2.7.0</swagger.version>
        <slf4j.version>1.7.25</slf4j.version>
        <jackson.version>2.9.0</jackson.version>
        <spring.boot.version>1.5.9.RELEASE</spring.boot.version>

        <!--
            Please note that there are dependencies between the gRPC and Netty TcNative versions.
            gRPC is quite specific about the version of Netty TcNative, so check the dependencies on
            https://mvnrepository.com/artifact/io.grpc/grpc-netty/<grpcVersion>

            - We use (in our default client artifact) a statically-linked version of Netty TcNative. This contains
              native libraries for BoringSSL (Google fork of OpenSSL).
        -->
        <grpc.version>1.7.1</grpc.version>
        <netty.tcnative.version>2.0.6.Final</netty.tcnative.version>
    </properties>

    <modules>
        <module>axonhub-client</module>
        <module>axonhub-grpc-proto</module>
        <module>axonhub-spring-boot-autoconfigure</module>
        <module>examples/example-client-no-spring</module>
        <module>integrationtest-springboot-axon31</module>
        <module>integrationtest-springboot-axon32</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.axoniq</groupId>
                <artifactId>axonhub-client</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-core</artifactId>
                <version>${axon.version}</version>
            </dependency>
            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-test</artifactId>
                <version>${axon.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.1.11</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>1.1.11</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>4.3.9.RELEASE</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.axonframework</groupId>
                <artifactId>axon-spring-boot-starter</artifactId>
                <version>${axon.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <version>${spring.boot.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
                <version>${spring.boot.version}</version>
            </dependency>

            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-protobuf</artifactId>
                <version>${grpc.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.code.findbugs</groupId>
                        <artifactId>jsr305</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.google.errorprone</groupId>
                        <artifactId>error_prone_annotations</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-stub</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-netty</artifactId>
                <version>${grpc.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-tcnative-boringssl-static</artifactId>
                <version>${netty.tcnative.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.9.0</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310 -->
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <!--suppress MavenModelInspection -->
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>axoniq-nexus</id>
            <url>https://dev-nexus.axoniq.io/repository/products-snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
        <!--<snapshotRepository>-->
            <!--<id>sonatype</id>-->
            <!--<url>https://oss.sonatype.org/content/repositories/snapshots</url>-->
            <!--<uniqueVersion>true</uniqueVersion>-->
        <!--</snapshotRepository>-->
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
            <uniqueVersion>false</uniqueVersion>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://github.com/AxonIQ/axoniq-axonhub-client.git</connection>
        <developerConnection>scm:git:https://github.com/AxonIQ/axoniq-axonhub-client.git</developerConnection>
        <url>https://github.com/AxonIQ/axoniq-axonhub-client.git</url>
        <tag>axonhub-client-parent-1.0.2</tag>
    </scm>

    <developers>
        <developer>
            <name>Allard Buijze</name>
            <email>allard.buijze@axoniq.io</email>
            <organization>AxonIQ</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Project Lead</role>
            </roles>
        </developer>
        <developer>
            <name>Frans van Buul</name>
            <email>frans.vanbuul@axoniq.io</email>
            <organization>AxonIQ</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <name>Marc Gathier</name>
            <email>marc.gathier@axoniq.io</email>
            <organization>AxonIQ</organization>
            <organizationUrl>https://axoniq.io</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

</project>
