<?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>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.5.7</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>
  <groupId>io.github.dissco</groupId>
  <artifactId>annotation-logic</artifactId>
  <version>0.1.18</version>
  <packaging>jar</packaging>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>Library containing logic to validate and apply annotations to digital specimens and
    digital media.
  </description>
  <url>https://github.com/DiSSCo/dissco-annotation-logic-library</url>
  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Soulaine Theocharides</name>
      <email>soulaine.theocharides@naturalis.nl</email>
      <organization>Distributed System of Scientific Collections</organization>
      <organizationUrl>https://www.dissco.eu/</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/DiSSCo/dissco-annotation-logic-library.git</connection>
    <developerConnection>scm:git:ssh://github.com:DiSSCo/dissco-annotation-logic-library.git
    </developerConnection>
    <tag/>
    <url>https://github.com/DiSSCo/dissco-annotation-logic-library/tree/main</url>
  </scm>
  <properties>
    <gpg.key.skip>false</gpg.key.skip>
    <jacoco.version>0.8.13</jacoco.version>
    <java.version>21</java.version>
    <jsonpath.version>2.9.0</jsonpath.version>
    <jsonschema2pojo.version>1.2.1</jsonschema2pojo.version>
    <jsonschema-validation.version>1.0.77</jsonschema-validation.version>
    <maven-exec.version>3.4.1</maven-exec.version>
    <maven-gpg.version>3.2.4</maven-gpg.version>
    <maven-javadoc.version>3.12.0</maven-javadoc.version>
    <maven-source.version>3.3.1</maven-source.version>
    <sonar.organization>dissco</sonar.organization>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.coverage.jacoco.xmlReportPaths>../app-it/target/site/jacoco-aggregate/jacoco.xml
    </sonar.coverage.jacoco.xmlReportPaths>
    <sonatype.version>0.8.0</sonatype.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>com.jayway.jsonpath</groupId>
      <artifactId>json-path</artifactId>
      <version>${jsonpath.version}</version>
    </dependency>
    <dependency>
      <groupId>com.networknt</groupId>
      <artifactId>json-schema-validator</artifactId>
      <version>${jsonschema-validation.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>${maven-exec.version}</version>
        <configuration>
          <mainClass>io.github.dissco.annotationlogic.maven.MavenRunner</mainClass>
          <arguments>
            <argument>
              https://schemas.dissco.tech/schemas/fdo-type/digital-specimen/0.4.0/digital-specimen.json
            </argument>
            <argument>
              https://schemas.dissco.tech/schemas/fdo-type/digital-media/0.4.0/digital-media.json
            </argument>
            <argument>
              https://schemas.dissco.tech/schemas/fdo-type/annotation/0.4.0/annotation.json
            </argument>
          </arguments>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jsonschema2pojo</groupId>
        <artifactId>jsonschema2pojo-maven-plugin</artifactId>
        <version>${jsonschema2pojo.version}</version>
        <configuration>
          <sourceDirectory>${basedir}/src/main/resources/json-schema/</sourceDirectory>
          <targetPackage>io.github.dissco.core.annotationlogic.schema</targetPackage>
          <generateBuilders>true</generateBuilders>
          <includeConstructors>true</includeConstructors>
          <includeDynamicBuilders>true</includeDynamicBuilders>
          <includeAdditionalProperties>true</includeAdditionalProperties>
          <inclusionLevel>NON_EMPTY</inclusionLevel>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>
                generate
              </goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>prepare-agent-integration</id>
            <goals>
              <goal>prepare-agent-integration</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>report-integration</id>
            <goals>
              <goal>report-integration</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

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

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${maven-gpg.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skip>${gpg.key.skip}</skip>
        </configuration>
      </plugin>

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

      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${sonatype.version}</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <parameters>true</parameters>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
