<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>dev.vality</groupId>
    <artifactId>java-service-dependencies</artifactId>
    <version>1.0.21</version>
    <packaging>pom</packaging>
    <name>Vality parent</name>
    <description>Vality library parent pom</description>
    <url>https://github.com/valitydev/java-service-dependencies</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/valitydev/java-service-dependencies</url>
        <developerConnection>scm:git:ssh://github.com/valitydev/java-service-dependencies.git</developerConnection>
        <connection>scm:git:git://github.com/valitydev/java-service-dependencies.git</connection>
    </scm>

    <developers>
        <developer>
            <email>devs@vality.dev</email>
            <organization>Vality</organization>
            <organizationUrl>https://vality.dev</organizationUrl>
        </developer>
    </developers>

    <properties>
        <pubRepoId>ossrh</pubRepoId>
        <pubRepo>https://s01.oss.sonatype.org/content/repositories/releases</pubRepo>
        <pubSnapRepoId>ossrh</pubSnapRepoId>
        <pubSnapRepo>https://s01.oss.sonatype.org/content/repositories/snapshots</pubSnapRepo>
        <pubStagingRepoId>ossrh</pubStagingRepoId>
        <pubStagingRepo>https://s01.oss.sonatype.org/</pubStagingRepo>
        <lombok.version>1.18.24</lombok.version>
        <msgpack-proto.version>1.15-ce882a7</msgpack-proto.version>
        <damsel.version>1.594-e12c03c</damsel.version>
        <nop-rolling.version>1.0.1</nop-rolling.version>
        <geck.verion>0.0.1</geck.verion>
        <db-common-lib.version>0.0.1</db-common-lib.version>
        <kafka-common-lib.version>0.0.3</kafka-common-lib.version>
        <aws-msk-iam-auth.version>1.1.5</aws-msk-iam-auth.version>
        <kotlin-logging.version>2.1.23</kotlin-logging.version>
        <mockito-kotlin.version>4.0.0</mockito-kotlin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>dev.vality</groupId>
                <artifactId>msgpack-proto</artifactId>
                <version>${msgpack-proto.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality</groupId>
                <artifactId>damsel</artifactId>
                <version>${damsel.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality.logback</groupId>
                <artifactId>nop-rolling</artifactId>
                <version>${nop-rolling.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality.geck</groupId>
                <artifactId>serializer</artifactId>
                <version>${geck.verion}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality.geck</groupId>
                <artifactId>common</artifactId>
                <version>${geck.verion}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality.geck</groupId>
                <artifactId>filter</artifactId>
                <version>${geck.verion}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality.geck</groupId>
                <artifactId>migrator</artifactId>
                <version>${geck.verion}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality</groupId>
                <artifactId>db-common-lib</artifactId>
                <version>${db-common-lib.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.vality</groupId>
                <artifactId>kafka-common-lib</artifactId>
                <version>${kafka-common-lib.version}</version>
            </dependency>
            <dependency>
                <groupId>software.amazon.msk</groupId>
                <artifactId>aws-msk-iam-auth</artifactId>
                <version>${aws-msk-iam-auth.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.microutils</groupId>
                <artifactId>kotlin-logging-jvm</artifactId>
                <version>${kotlin-logging.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito.kotlin</groupId>
                <artifactId>mockito-kotlin</artifactId>
                <version>${mockito-kotlin.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <profiles>
        <profile>
            <id>deploy</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>${pubSnapRepoId}</id>
                    <url>${pubSnapRepo}</url>
                </snapshotRepository>
                <repository>
                    <id>${pubRepoId}</id>
                    <url>${pubRepo}</url>
                </repository>
            </distributionManagement>
            <repositories>
                <repository>
                    <id>${pubSnapRepoId}</id>
                    <url>${pubSnapRepo}</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.4.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <doclint>none</doclint>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>${pubStagingRepoId}</serverId>
                            <nexusUrl>${pubStagingRepo}</nexusUrl>
                            <autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>common</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>env.MVN_PROFILE</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <version>3.10.1</version>
                            <configuration>
                                <source>1.8</source>
                                <target>1.8</target>
                                <encoding>UTF-8</encoding>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>
