<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>app.getxray</groupId>
  <artifactId>xray-maven-plugin-parent</artifactId>
  <version>0.11.2</version>
  <packaging>pom</packaging>
  <name>xray-maven-plugin-parent</name>
  <description>Maven plugin for interacting with Xray (server/datacenter and cloud), used in CI/CD for assisting in test automation flows, such as reporting test results back to Xray and, by consequence, Jira.</description>
  <url>https://github.com/Xray-App/xray-maven-plugin</url>

  <modules>
    <module>xray-maven-plugin</module>
    <module>xray-java-client</module>
    <module>xray-maven-plugin-report</module>
  </modules>

  <licenses>
    <license>
      <name>BSD 3-Clause</name>
      <url>https://raw.githubusercontent.com/Xray-App/xray-maven-plugin/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Xblend</name>
    <url>https://www.getxray.app</url>
  </organization>

  <developers>
    <developer>
      <name>Sergio Freire</name>
      <email>sergio.freire@getxray.app</email>
      <organization>Xblend</organization>
      <organizationUrl>https://www.getxray.app</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/Xray-App/xray-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://github.com/Xray-App/xray-maven-plugin.git</developerConnection>
    <url>https://github.com/Xray-App/xray-maven-plugin/tree/main</url>
  </scm>

  <properties>
    <maven.compiler.release>17</maven.compiler.release>
    <maven.compiler.target>17</maven.compiler.target>
    <maven.compiler.source>17</maven.compiler.source>
    <maven-plugin-api.version>3.8.5</maven-plugin-api.version>
    <maven-plugin-annotations.version>3.6.4</maven-plugin-annotations.version>
    <maven-project.version>2.2.1</maven-project.version>
    <maven-plugin-plugin.version>3.6.4</maven-plugin-plugin.version>
    <maven-site-plugin.version>3.12.0</maven-site-plugin.version>
    <maven-failsafe-plugin.version>3.5.4</maven-failsafe-plugin.version>
    <maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
    <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
    <maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
    <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
    <xray-junit-extensions.version>1.0.0</xray-junit-extensions.version>
    <mockito.version>4.11.0</mockito.version>
    <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <itf.version>0.13.1</itf.version>
    <junit.version>5.14.1</junit.version>
    <jacoco.version>0.8.14</jacoco.version>
    <internal.xray-maven-plugin.version>0.9.0</internal.xray-maven-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
            <dependency>
                    <groupId>org.junit</groupId>
                    <artifactId>junit-bom</artifactId>
                    <version>${junit.version}</version>
                    <type>pom</type>
                    <scope>import</scope>
            </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
        <dependency>
            <groupId>app.getxray</groupId>
            <artifactId>xray-maven-plugin</artifactId>
            <version>${internal.xray-maven-plugin.version}</version>
            <scope>test</scope>
        </dependency>
  </dependencies> 

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${nexus-staging-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
                <serverId>central-portal</serverId>
                <nexusUrl>https://ossrh-staging-api.central.sonatype.com</nexusUrl>
                <autoReleaseAfterClose>true</autoReleaseAfterClose>
                <skipRemoteStaging>false</skipRemoteStaging>
            </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
        <plugin>
            <groupId>app.getxray</groupId>
            <artifactId>xray-maven-plugin</artifactId>
            <version>${internal.xray-maven-plugin.version}</version>
            <configuration>
                <cloud>true</cloud>
                <projectKey>XMP</projectKey>
                <version>${project.version}</version>
                <reportFormat>junit</reportFormat>
                <reportFile>xray-maven-plugin/reports/custom*.xml</reportFile>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <executions>
                <execution>
                    <id>attach-javadocs</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
                <execution>
                    <id>sign-artifacts</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <inherited>false</inherited>
        </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

</project>
