<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.exonum.binding</groupId>
    <artifactId>exonum-java-binding-parent</artifactId>
    <version>0.10.0</version>
  </parent>

  <artifactId>exonum-testkit</artifactId>
  <version>0.10.0</version>
  <packaging>jar</packaging>

  <name>Exonum TestKit</name>
  <url>https://exonum.com/doc/version/latest/get-started/test-service/</url>

  <properties>
    <ejb-core.nativeLibPath>${project.parent.basedir}/core/rust/target/debug
    </ejb-core.nativeLibPath>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.exonum.binding</groupId>
      <artifactId>exonum-java-app</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit.jupiter.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-testkit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.exonum.binding</groupId>
      <artifactId>exonum-java-testing</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>
            ${jacoco.args}
            -Djava.library.path=${ejb-core.nativeLibPath}
            ${java.vm.assertionFlag}
          </argLine>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>${project.parent.basedir}/../checkstyle.xml</configLocation>
          <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <extensions>true</extensions>
        <executions>
          <execution>
            <goals>
              <goal>test-compile</goal>
            </goals>
            <configuration>
              <protocArtifact>
                com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
              </protocArtifact>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <extensions>
      <!-- Use an extension that sets the OS classifier, required to locate
           the correct protoc executable -->
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>${os-maven-plugin.version}</version>
      </extension>
    </extensions>
  </build>
</project>
