<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>cz.xtf</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <version>0.21</version>
    <name>XTF</name>
    <description>XTF is a framework designed to ease up aspects of testing in OpenShift environment.</description>
    <url>https://github.com/xtf-cz/xtf/</url>

    <modules>
        <module>core</module>
        <module>builder</module>
        <module>junit5</module>
        <module>http-client</module>
        <module>test-helpers</module>
    </modules>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:xtf-cz/xtf.git</connection>
        <developerConnection>scm:git:git@github.com:xtf-cz/xtf.git</developerConnection>
        <url>http://github.com/xtf-cz/xtf.git</url>
        <tag>0.21</tag>
    </scm>

    <developers>
        <developer>
            <id>mnovak1</id>
            <name>Miroslav Novak</name>
            <organization>Red Hat</organization>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>jboss-releases-repository</id>
            <name>JBoss Releases Repository</name>
            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>jboss-snapshots-repository</id>
            <name>JBoss Snapshots Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <!-- Configuration properties -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>

        <!-- Dependency version properties -->
        <version.httpclient>4.5.12</version.httpclient>
        <version.openshift-client>4.13.0</version.openshift-client>
        <version.commons-io>2.8.0</version.commons-io>
        <version.commons-lang3>3.11</version.commons-lang3>
        <version.commons-compress>1.20</version.commons-compress>
        <version.commons-codec>1.15</version.commons-codec>
        <version.slf4j-api>1.7.30</version.slf4j-api>
        <version.rxjava-string>1.1.1</version.rxjava-string>
        <version.rxjava>1.3.8</version.rxjava>
        <version.jboss-dmr>1.3.0.Final</version.jboss-dmr>
        <version.junit5.platform>1.7.0</version.junit5.platform>
        <version.junit5.jupiter>5.7.0</version.junit5.jupiter>
        <version.junit5.jupiter.engine>5.7.0</version.junit5.jupiter.engine>
        <version.assertj-core>3.17.2</version.assertj-core>
        <version.lombok>1.18.12</version.lombok>
        <version.gson>2.8.6</version.gson>

        <!-- Plugin version properties -->
        <version.maven-source-plugin>3.2.1</version.maven-source-plugin>
        <version.maven-release-plugin>2.5.3</version.maven-release-plugin>
        <version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
        <version.maven-checkstyle-plugin>3.1.1</version.maven-checkstyle-plugin>
        <version.maven-surefire-plugin>3.0.0-M5</version.maven-surefire-plugin>
        <version.maven-javadoc-plugin>3.2.0</version.maven-javadoc-plugin>
        <version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>cz.xtf</groupId>
                <artifactId>core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>openshift-client</artifactId>
                <version>${version.openshift-client}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${version.commons-io}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${version.commons-lang3}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${version.commons-compress}</version>
            </dependency>

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${version.commons-codec}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j-api}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${version.httpclient}</version>
            </dependency>

            <dependency>
                <groupId>io.reactivex</groupId>
                <artifactId>rxjava-string</artifactId>
                <version>${version.rxjava-string}</version>
            </dependency>

            <dependency>
                <groupId>io.reactivex</groupId>
                <artifactId>rxjava</artifactId>
                <version>${version.rxjava}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss</groupId>
                <artifactId>jboss-dmr</artifactId>
                <version>${version.jboss-dmr}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-launcher</artifactId>
                <version>${version.junit5.platform}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${version.junit5.jupiter}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${version.junit5.jupiter.engine}</version>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.assertj-core}</version>
            </dependency>

            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${version.lombok}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${version.gson}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.maven-surefire-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.maven-compiler-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version.maven-release-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.maven-source-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${version.maven-checkstyle-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.maven-javadoc-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${version.maven-gpg-plugin}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>2.11.0</version>
                <configuration>
                    <configFile>${maven.multiModuleProjectDirectory}/ide-config/eclipse-format.xml</configFile>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
                <version>1.3.2</version>
                <configuration>
                    <groups>java.,javax.,org.,com.</groups>
                    <staticGroups>*</staticGroups>
                    <removeUnused>true</removeUnused>
                </configuration>
                <executions>
                    <execution>
                        <id>sort-imports</id>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
