<?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.skodjob</groupId>
    <artifactId>test-frame</artifactId>
    <packaging>pom</packaging>
    <version>0.11.0</version>

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

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Kubernetes test library</description>
    <url>https://github.com/skodjob/test-frame</url>

    <scm>
        <connection>scm:git:git:/github.com/skodjob/test-frame.git</connection>
        <developerConnection>scm:git:ssh://github.com/skodjob/test-frame.git</developerConnection>
        <url>https://github.com/skodjob/test-frame</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/skodjob/test-frame/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <id>im-konge</id>
            <name>Lukáš Král</name>
            <email>lukywill16@gmail.com</email>
        </developer>
        <developer>
            <id>kornys</id>
            <name>David Kornel</name>
            <email>kornys@outlook.com</email>
        </developer>
        <developer>
            <id>Frawless</id>
            <name>Jakub Stejskal</name>
            <email>xstejs24@gmail.com</email>
        </developer>
        <developer>
            <id>obabec</id>
            <name>Ondrej Babec</name>
            <email>ond.babec@gmail.com</email>
        </developer>
        <developer>
            <id>see-quick</id>
            <name>Maros Orsak</name>
            <email>maros.orsak159@gmail.com</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.release>17</maven.compiler.release>

        <fabric8.version>7.1.0</fabric8.version>
        <log4j.version>2.24.3</log4j.version>
        <slf4j.version>2.0.17</slf4j.version>

        <!--  TEST dependencies  -->
        <mockito.version>5.16.1</mockito.version>
        <apache.commons.version>2.18.0</apache.commons.version>

        <!--   Build tools' properties     -->
        <spotbugs.version>4.9.3</spotbugs.version>
        <maven.spotbugs.version>4.9.3.0</maven.spotbugs.version>
        <maven.checkstyle.version>3.6.0</maven.checkstyle.version>
        <maven.dependency.version>3.8.1</maven.dependency.version>

        <maven.compile.plugin.version>3.14.0</maven.compile.plugin.version>
        <maven.source.plugin.version>3.3.1</maven.source.plugin.version>
        <maven.gpg.version>3.2.7</maven.gpg.version>
        <sonatype.nexus.central>0.7.0</sonatype.nexus.central>
        <maven.javadoc.version>3.11.2</maven.javadoc.version>
        <maven.assembly.version>3.7.1</maven.assembly.version>
        <maven.plugin.plugin.version>3.9.0</maven.plugin.plugin.version>
        <junit.jupiter.version>5.12.1</junit.jupiter.version>
        <junit.platform.version>1.12.1</junit.platform.version>
        <maven.surefire.version>3.5.3</maven.surefire.version>
        <jackson-dataformat-yaml.version>2.18.3</jackson-dataformat-yaml.version>
        <org.eclipse.sisu.version>0.9.0.M3</org.eclipse.sisu.version>
        <bouncycastle.version>1.80</bouncycastle.version>

        <it.skip>true</it.skip>
        <!--suppress UnresolvedMavenProperty -->
        <ut.skip>${skipTests}</ut.skip>

        <checkstyle.config.location>checkstyle.xml</checkstyle.config.location>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.skodjob</groupId>
                <artifactId>test-frame-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.skodjob</groupId>
                <artifactId>test-frame-kubernetes</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.skodjob</groupId>
                <artifactId>test-frame-openshift</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.skodjob</groupId>
                <artifactId>test-frame-log-collector</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.skodjob</groupId>
                <artifactId>test-frame-metrics-collector</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>kubernetes-client-bom-with-deps</artifactId>
                <version>${fabric8.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-commons</artifactId>
                <version>${junit.platform.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-launcher</artifactId>
                <version>${junit.platform.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-engine</artifactId>
                <version>${junit.platform.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.surefire.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>${jackson-dataformat-yaml.version}</version>
            </dependency>
            <!--    Logger      -->
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j2-impl</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${apache.commons.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.eclipse.sisu</groupId>
                <artifactId>org.eclipse.sisu.inject</artifactId>
                <version>${org.eclipse.sisu.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk18on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compile.plugin.version}</version>
                <configuration>
                    <compilerArgs>
                        <arg>-proc:full</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${maven.spotbugs.version}</version><dependencies>
                <!-- overwrite dependency on spotbugs if you want to specify the version of˓→spotbugs -->
                <dependency>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs</artifactId>
                    <version>${spotbugs.version}</version>
                </dependency></dependencies>
                <configuration>
                    <effort>Max</effort>
                    <!-- Reports all bugs (other values are medium and max) -->
                    <threshold>Low</threshold>
                    <!-- Produces XML report -->
                    <xmlOutput>true</xmlOutput>
                    <!-- Configures the directory in which the XML report is created -->
                    <spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs</spotbugsXmlOutputDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <show>public</show>
                            <failOnError>true</failOnError>
                            <failOnWarnings>true</failOnWarnings>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.version}</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.version}</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>none</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <prependGroupId>true</prependGroupId>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                    <execution>
                        <id>set-classpath</id>
                        <phase>none</phase>
                        <goals>
                            <goal>build-classpath</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <outputProperty>project.dist.classpath</outputProperty>
                            <attach>false</attach>
                            <prefix>lib</prefix>
                            <prependGroupId>true</prependGroupId>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.surefire.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>verify</goal>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skipITs>${it.skip}</skipITs>
                    <forkCount>1</forkCount>
                    <includes>
                        <include>**/IT*.java</include>
                        <include>**/*IT.java</include>
                    </includes>
                    <properties>
                        <configurationParameters>
                            junit.jupiter.extensions.autodetection.enabled = true
                        </configurationParameters>
                    </properties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
                <inherited>true</inherited>
                <configuration>
                    <properties>
                        <configurationParameters>
                            junit.jupiter.extensions.autodetection.enabled = true
                        </configurationParameters>
                    </properties>
                    <skipTests>${ut.skip}</skipTests>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>integration</id>
            <properties>
                <it.skip>false</it.skip>
                <ut.skip>true</ut.skip>
            </properties>
            <modules>
                <module>test-frame-common</module>
                <module>test-frame-kubernetes</module>
                <module>test-frame-openshift</module>
                <module>test-frame-test-examples</module>
                <module>test-frame-metrics-collector</module>
                <module>test-frame-log-collector</module>
            </modules>
        </profile>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>test-frame-common</module>
                <module>test-frame-kubernetes</module>
                <module>test-frame-openshift</module>
                <module>test-frame-test-examples</module>
                <module>test-frame-metrics-collector</module>
                <module>test-frame-log-collector</module>
            </modules>
        </profile>
        <profile>
            <id>central-sonatype</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <modules>
                <module>test-frame-common</module>
                <module>test-frame-kubernetes</module>
                <module>test-frame-openshift</module>
                <module>test-frame-metrics-collector</module>
                <module>test-frame-log-collector</module>
            </modules>
            <properties>
                <!--suppress UnresolvedMavenProperty -->
                <gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
                <!--suppress UnresolvedMavenProperty -->
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
                <!--suppress UnresolvedMavenProperty -->
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--batch</arg>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${sonatype.nexus.central}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <checksums>all</checksums>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>${maven.assembly.version}</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <appendAssemblyId>false</appendAssemblyId>
                                    <tarLongFileMode>posix</tarLongFileMode>
                                    <descriptors>
                                        <descriptor>test-frame-common/src/main/assembly/dist.xml</descriptor>
                                        <descriptor>test-frame-kubernetes/src/main/assembly/dist.xml</descriptor>
                                        <descriptor>test-frame-openshift/src/main/assembly/dist.xml</descriptor>
                                        <descriptor>test-frame-metrics-collector/src/main/assembly/dist.xml</descriptor>
                                        <descriptor>test-frame-log-collector/src/main/assembly/dist.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
