<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://maven.apache.org/POM/4.0.0"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.annot8</groupId>
  <artifactId>annot8-parent</artifactId>
  <version>1.0.2</version>
  <packaging>pom</packaging>

  <name>Annot8 Parent</name>
  <description>Parent POM that contains common properties for all Annot8 projects</description>
  <inceptionYear>2017</inceptionYear>
  <url>http://annot8.io</url>

  <developers>
    <developer>
      <name>James Baker</name>
      <url>https://github.com/jamesdbaker</url>
    </developer>
    <developer>
      <name>Chris Flatley</name>
      <url>https://github.com/chrisflatley</url>
    </developer>
    <developer>
      <name>Stuart Hendren</name>
      <url>https://github.com/stuarthendren</url>
    </developer>
    <developer>
      <name>Steven Taylor</name>
      <url>https://github.com/stevenmtaylor</url>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache Software License 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <issueManagement>
    <url>https://github.com/annot8/annot8/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>

  <scm>
    <url>https://github.com/annot8/annot8/</url>
    <connection>scm:git:git://github.com/annot8/annot8.git</connection>
    <developerConnection>scm:git:git@github.com/annot8/annot8.git</developerConnection>
  </scm>

  <properties>
    <!-- Project settings -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>11</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>

    <!-- Annot8 API Version -->
    <annot8.version>1.0</annot8.version>

    <!-- Core utitities and helpers -->
    <jsonb.version>1.0</jsonb.version>
    <jsonapi.version>1.1.4</jsonapi.version>
    <lombok.version>1.18.16</lombok.version>
    <guava.version>30.1-jre</guava.version>
    <slf4j.version>1.7.30</slf4j.version>
    <micrometer.version>1.6.3</micrometer.version>
    <classgraph.version>4.8.98</classgraph.version>

    <!-- Testing -->
    <junit.version>5.7.0</junit.version>
    <mockito.version>3.7.0</mockito.version>
    <assertj-core.version>3.18.1</assertj-core.version>
    <assertj-guava.version>3.4.0</assertj-guava.version>
    <yasson.version>1.0.7</yasson.version> <!-- Note 1.0.8 causes deserialization to fail in some instances -->

    <!-- Plugins -->
    <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    <junit-platform-surefire-provider.version>1.3.2</junit-platform-surefire-provider.version>
    <speedy-spotless.version>0.1.1</speedy-spotless.version>
    <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
    <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
    <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <githook-maven-plugin.version>1.0.5</githook-maven-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>javax.json</groupId>
      <artifactId>javax.json-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.json.bind</groupId>
      <artifactId>javax.json.bind-api</artifactId>
    </dependency>

    <!-- Test dependencies for all projects -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-guava</artifactId>
    </dependency>
  </dependencies>


  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${nexus-staging-maven-plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.committed</groupId>
        <artifactId>speedy-spotless-maven-plugin</artifactId>
        <version>${speedy-spotless.version}</version>
        <executions>
          <execution>
            <id>install-formatter-hook</id>
            <goals>
              <goal>install-hooks</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <java>
            <licenseHeader>
              <content>/* Annot8 (annot8.io) - Licensed under Apache-2.0. */</content>
            </licenseHeader>
            <googleJavaFormat />
            <removeUnusedImports />
          </java>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <configuration>
            <additionalJOptions>-html5</additionalJOptions>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencyManagement>
    <dependencies>
      <!-- Annot8 -->
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-api</artifactId>
        <version>${annot8.version}</version>
      </dependency>
      <!-- Common -->
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-common-components</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-common-data</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-common-processors</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-common-serialization</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-common-utils</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- Implementations-->
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-implementations-support</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-reference-implementation</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-pipelines-implemenation</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- Testing -->
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-test-impl</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.annot8</groupId>
        <artifactId>annot8-impl-tck</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- JSON -->
      <dependency>
        <groupId>javax.json</groupId>
        <artifactId>javax.json-api</artifactId>
        <version>${jsonapi.version}</version>
      </dependency>
      <dependency>
        <groupId>javax.json.bind</groupId>
        <artifactId>javax.json.bind-api</artifactId>
        <version>${jsonb.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse</groupId>
        <artifactId>yasson</artifactId>
        <version>${yasson.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Utilities -->
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
        <!-- This causes many issues with Java 9, use javax.annotations instead -->
        <exclusions>
          <exclusion>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>io.micrometer</groupId>
        <artifactId>micrometer-core</artifactId>
        <version>${micrometer.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.classgraph</groupId>
        <artifactId>classgraph</artifactId>
        <version>${classgraph.version}</version>
      </dependency>

      <!-- Testing -->
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${junit.version}</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>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj-core.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-guava</artifactId>
        <version>${assertj-guava.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>annot8-common</module>
    <module>annot8-testing</module>
    <module>annot8-implementations</module>
  </modules>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
