<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>

    <groupId>com.antonzhdanov</groupId>
    <artifactId>sshd-cloud-agent</artifactId>
    <version>1.0.2</version>
    <packaging>pom</packaging>

    <name>SSHD Cloud Agent</name>
    <description>SSHD extension for client auth using Key from cloud</description>
    <url>https://github.com/Niro/sshd-cloud-agent</url>

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

    <developers>
        <developer>
            <name>Anton Zhdanov</name>
            <email>me@antonzhdanov.com</email>
            <organizationUrl>https://github.com/Niro</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/Niro/sshd-cloud-agent.git</connection>
        <developerConnection>scm:git:ssh://github.com:Niro/sshd-cloud-agent.git</developerConnection>
        <url>https://github.com/Niro/sshd-cloud-agent/tree/main</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <modules>
        <module>sshd-cloud-agent-core</module>
        <module>sshd-cloud-agent-test</module>
        <module>sshd-cloud-agent-aws</module>
        <module>sshd-cloud-agent-google</module>
        <module>sshd-cloud-agent-azure</module>
        <module>sshd-cloud-agent-oracle</module>
    </modules>

    <properties>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>

        <sshd-core.version>2.9.2</sshd-core.version>
        <aws-kms.version>2.20.12</aws-kms.version>
        <google-cloud-kms.version>2.15.0</google-cloud-kms.version>
        <testcontainers.version>1.17.6</testcontainers.version>
        <lombok.version>1.18.26</lombok.version>
        <gson.version>2.10.1</gson.version>
        <yandex-cloud-sdk.version>2.5.3</yandex-cloud-sdk.version>
        <azure.version>1.2.10</azure.version>
        <testng.version>7.6.1</testng.version>
        <mockito.version>5.1.1</mockito.version>
        <oci.version>3.13.1</oci.version>
        <spring-vault.version>2.3.3</spring-vault.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.sshd</groupId>
                <artifactId>sshd-core</artifactId>
                <version>${sshd-core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.yandex.cloud</groupId>
                <artifactId>java-sdk-services</artifactId>
                <version>${yandex-cloud-sdk.version}</version>
            </dependency>
            <dependency>
                <groupId>com.azure</groupId>
                <artifactId>azure-sdk-bom</artifactId>
                <version>${azure.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>software.amazon.awssdk</groupId>
                <artifactId>kms</artifactId>
                <version>${aws-kms.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.cloud</groupId>
                <artifactId>google-cloud-kms</artifactId>
                <version>${google-cloud-kms.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>com.oracle.oci.sdk</groupId>
                <artifactId>oci-java-sdk-keymanagement</artifactId>
                <version>${oci.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.vault</groupId>
                <artifactId>spring-vault-core</artifactId>
                <version>${spring-vault.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>IT</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.22.2</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <skipITs>false</skipITs>
                            <includes>
                                <include>**/*IntegrationTest</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deploy</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <createChecksum>true</createChecksum>
                <skipTests>true</skipTests>
            </properties>
            <build>
                <plugins>
                    <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>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <excludes>
                            <exclude>**/*IntegrationTest</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
