<?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</artifactId>
  <version>0.7.2</version>
  <packaging>maven-plugin</packaging>
  <name>xray-maven-plugin</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>

  <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>
    <developer>
      <name>Cristiano Cunha</name>
      <email>cristiano.cunha@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.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</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>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- <maven.version>3.8.4</maven.version> -->
    <itf.version>0.11.0</itf.version>
    <junit.version>5.8.2</junit.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven-plugin-api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${maven-plugin-annotations.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${maven-project.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.9.3</version>
    </dependency>

    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20210307</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.4.1</version>
    </dependency>

    <!-- Test Dependencies -->
    <!--
          <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>
        -->

    <dependency>
      <groupId>com.github.tomakehurst</groupId>
      <artifactId>wiremock-jre8-standalone</artifactId>
      <version>2.32.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.22.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.soebes.itf.jupiter.extension</groupId>
      <artifactId>itf-assertj</artifactId>
      <version>${itf.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.soebes.itf.jupiter.extension</groupId>
      <artifactId>itf-jupiter-extension</artifactId>
      <version>${itf.version}</version>
      <scope>test</scope>
    </dependency>
  
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>3.3.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

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

  <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>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
      </plugin>

      <plugin>
        <groupId>com.soebes.itf.jupiter.extension</groupId>
        <artifactId>itf-maven-plugin</artifactId>
        <version>${itf.version}</version>
        <executions>
          <execution>
            <id>installing</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>install</goal>
              <goal>resources-its</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.22.2</version>
        <configuration>
          <!--
            check if the following ones are actually needed or not to run the integration tests
            -->
          <systemProperties>
            <maven.version>${maven.version}</maven.version>
            <maven.home>${maven.home}</maven.home>
          </systemProperties>

          <!--
                  <includes>
                    <include>**/*IT.java</include>
                  </includes>
          -->

        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
    <testResources>
      <testResource>
        <directory>src/test/resources-its</directory>
      </testResource>
    </testResources>
  </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>
