<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017 The RoboZonky Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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">
  <parent>
    <artifactId>robozonky</artifactId>
    <groupId>com.github.robozonky</groupId>
    <version>4.7.6</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>robozonky-api</artifactId>
  <name>RoboZonky: Public, stable APIs</name>

  <properties>
    <project.automatic.module.name>com.github.robozonky.api</project.automatic.module.name>
  </properties>

  <dependencies>
    <dependency> <!-- APIs for RESTEasy -->
      <groupId>org.jboss.spec.javax.ws.rs</groupId>
      <artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.xml.bind</groupId>
      <artifactId>jboss-jaxb-api_2.3_spec</artifactId>
    </dependency>
    <dependency> <!-- JAXB support -->
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
    </dependency>
    <dependency> <!-- Also required -->
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
    </dependency>
    <dependency> <!-- Annotations for Jackson -->
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <version>0.10.1</version>
        <dependencies>
          <dependency>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-java</artifactId>
            <version>0.16.0</version>
          </dependency>
        </dependencies>
        <configuration>
          <versionFormat>[1-9]+\.[0-9]+\.[0-9]+</versionFormat>
          <analysisConfiguration><![CDATA[
            {
              "revapi": {
                "java": {
                  "filter": {
                    "packages": {
                      "regex": true,
                      "exclude": ["com\\.github\\.robozonky\\.internal(\\..+)?"]
                    }
                  }
                },
                "ignore": [
                ]
              }
            }
          ]]></analysisConfiguration>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-maven</artifactId>
        <configuration>
          <targetClasses> <!-- this is a hack to be able to exclude entities, but include its sanitized subpackage -->
            <param>com.github.robozonky.internal.*</param>
            <param>com.github.robozonky.api.confirmations.*</param>
            <param>com.github.robozonky.api.remote.enums.*</param>
            <param>com.github.robozonky.api.remote.entities.sanitized.*</param>
            <param>com.github.robozonky.api.strategies.*</param>
            <!-- notifications are also excluded as those are mostly getters -->
          </targetClasses>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
