<?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.quarkus.qe</groupId>
    <artifactId>flaky-run-reporter</artifactId>
    <name>Flaky Run Reporter - Maven Extension</name>
    <version>0.1.2.Beta1</version>
    <packaging>jar</packaging>
    <description>Creates report on flaky tests detected during SureFire and FailSafe test runs</description>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-core.version>3.9.6</maven-core.version>
        <maven-surefire-report-parser.version>3.2.5</maven-surefire-report-parser.version>
        <plexus-containers.version>2.2.0</plexus-containers.version>
        <jackson-databind.version>2.16.1</jackson-databind.version>
        <formatter-maven-plugin.version>2.23.0</formatter-maven-plugin.version>
        <!-- Format Settings -->
        <src.format.goal>format</src.format.goal>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-component-annotations</artifactId>
            <version>${plexus-containers.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson-databind.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-report-parser</artifactId>
            <version>${maven-surefire-report-parser.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-metadata</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${formatter-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>${src.format.goal}</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <lineEnding>LF</lineEnding>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <tagNameFormat>@{project.version}</tagNameFormat>
                            <pushChanges>false</pushChanges>
                            <localCheckout>true</localCheckout>
                            <remoteTagging>false</remoteTagging>
                            <arguments>-DskipTests=true</arguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <serverId>ossrh</serverId>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            <stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

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

    <developers>
        <developer>
            <id>quarkus-qe</id>
            <name>Quarkus QE</name>
            <organization>Quarkus QE</organization>
            <url>https://github.com/quarkus-qe</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:quarkus-qe/flaky-run-reporter.git</connection>
        <developerConnection>scm:git:git@github.com:quarkus-qe/flaky-run-reporter.git</developerConnection>
        <url>https://github.com/quarkus-qe/flaky-run-reporter</url>
        <tag>0.1.2.Beta1</tag>
    </scm>
    <url>https://github.com/quarkus-qe/flaky-run-reporter/</url>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/quarkus-qe/flaky-run-reporter/issues</url>
    </issueManagement>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>oss.sonatype</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
