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

  <parent>
    <groupId>org.jvnet.hudson.plugins</groupId>
    <artifactId>analysis-pom</artifactId>
    <version>10.4.0</version>
    <relativePath />
  </parent>

  <groupId>io.jenkins.plugins</groupId>
  <artifactId>coverage</artifactId>
  <version>2.1.0</version>
  <packaging>hpi</packaging>

  <name>Coverage Plugin</name>
  <description>Collects reports of code coverage or mutation coverage tools and visualizes the results. It has support
    for the following report formats: JaCoCo, Cobertura, and PIT.</description>
  <url>https://github.com/jenkinsci/coverage-plugin</url>

  <properties>
    <gitHubRepo>jenkinsci/coverage-plugin</gitHubRepo>

    <!-- Library Dependencies Versions -->
    <coverage-model.version>0.53.0</coverage-model.version>
    <jsoup.version>1.18.3</jsoup.version>

    <!-- Jenkins Plug-in Dependencies Versions -->
    <git-forensics.version>3.1.0</git-forensics.version>

    <!-- Test Library Dependencies Versions -->
    <xmlunit.version>2.10.0</xmlunit.version>
    <testcontainers.version>1.20.4</testcontainers.version>
    <job-dsl.version>1.87</job-dsl.version>

    <arcmutate.git.version>2.0.0</arcmutate.git.version>
  </properties>

  <developers>
    <developer>
      <name>Ullrich Hafner</name>
      <id>uhafner</id>
      <email>ullrich.hafner@gmail.com</email>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://opensource.org/licenses/MIT</url>
    </license>
  </licenses>

  <dependencies>
    <dependency>
      <groupId>edu.hm.hafner</groupId>
      <artifactId>coverage-model</artifactId>
      <version>${coverage-model.version}</version>
      <exclusions>
        <exclusion>
          <groupId>edu.hm.hafner</groupId>
          <artifactId>codingstyle</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.errorprone</groupId>
          <artifactId>error_prone_annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang3</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-text</artifactId>
        </exclusion>
        <exclusion>
          <groupId>one.util</groupId>
          <artifactId>streamex</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
      <version>${jsoup.version}</version>
    </dependency>

    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>ionicons-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>token-macro</artifactId>
      <optional>true</optional>
    </dependency>

    <!-- Plugin Dependencies -->
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-multibranch</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-step-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>jackson2-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>checks-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>echarts-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>bootstrap5-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>jquery3-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>data-tables-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>forensics-api</artifactId>
      <!-- TODO: remove the version when a matching BOM is available -->
      <version>3.0.0</version>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>plugin-util-api</artifactId>
      <!-- TODO: remove the version when a matching BOM is available -->
      <version>6.0.0</version>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>font-awesome-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>prism-api</artifactId>
    </dependency>

    <!-- Test Dependencies -->
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>plugin-util-api</artifactId>
      <!-- TODO: remove the version when a matching BOM is available -->
      <version>6.0.0</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <version>${xmlunit.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>net.bytebuddy</groupId>
          <artifactId>byte-buddy</artifactId>
        </exclusion>
        <exclusion>
          <groupId>jakarta.xml.bind</groupId>
          <artifactId>jakarta.xml.bind-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-assertj</artifactId>
      <version>${xmlunit.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>net.bytebuddy</groupId>
          <artifactId>byte-buddy</artifactId>
        </exclusion>
        <exclusion>
          <groupId>jakarta.xml.bind</groupId>
          <artifactId>jakarta.xml.bind-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-cps</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-job</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-basic-steps</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-durable-task-step</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-support</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkinsci.plugins</groupId>
      <artifactId>pipeline-model-definition</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.jenkins-ci.plugins</groupId>
          <artifactId>cloudbees-folder</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>credentials</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>git</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>git-client</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>git-forensics</artifactId>
      <version>${git-forensics.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>timestamper</artifactId>
      <version>1.27</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>ssh-credentials</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>ssh-slaves</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>${testcontainers.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-compress</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${testcontainers.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.jenkins</groupId>
      <artifactId>configuration-as-code</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>job-dsl</artifactId>
      <version>${job-dsl.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>xmlunit</artifactId>
          <groupId>xmlunit</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-assertions-generator-maven-plugin</artifactId>
        <configuration>
          <packages combine.children="append">
            <package>io.jenkins.plugins.coverage.metrics</package>
            <package>io.jenkins.plugins.coverage.model</package>
          </packages>
          <excludes combine.children="append">
            <exclude>.*ITest.*</exclude>
            <exclude>.*CoverageXmlStream.*</exclude>
          </excludes>
          <entryPointClassPackage>io.jenkins.plugins.coverage.metrics</entryPointClassPackage>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <configuration>
          <targetClasses>
            <param>io.jenkins.plugins.coverage.metrics.*</param>
          </targetClasses>
          <targetTests>
            <param>io.jenkins.plugins.coverage.metrics.*</param>
          </targetTests>
          <excludedTestClasses>
            <param>*Assert</param>
            <param>*Assertions</param>
            <param>*ArchitectureTest</param>
            <param>*ITest</param>
            <param>*jmh_generated*</param>
          </excludedTestClasses>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.groupcdg.pitest</groupId>
            <artifactId>pitest-accelerator-junit5</artifactId>
            <version>1.0.6</version>
          </dependency>
          <dependency>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-junit5-plugin</artifactId>
            <version>1.2.1</version>
          </dependency>
          <dependency>
            <groupId>com.groupcdg</groupId>
            <artifactId>pitest-git-plugin</artifactId>
            <version>1.1.4</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.arcmutate</groupId>
          <artifactId>pitest-git-maven-plugin</artifactId>
          <version>${arcmutate.git.version}</version>
        </plugin>
        <!-- provides direct integration with github when accepting PRs from trusted branches -->
        <plugin>
          <groupId>com.arcmutate</groupId>
          <artifactId>pitest-github-maven-plugin</artifactId>
          <version>${arcmutate.git.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>pit</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-maven</artifactId>
            <executions>
              <execution>
                <id>test</id>
                <goals>
                  <goal>mutationCoverage</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <scm>
    <connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
    <developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
    <url>https://github.com/${gitHubRepo}</url>
    <tag>v2.1.0</tag>
  </scm>

  <repositories>
    <repository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </repository>
    <repository>
      <id>incrementals.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/incrementals/</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </pluginRepository>
  </pluginRepositories>

</project>
