<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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.molgenis</groupId>
  <artifactId>vcf-io</artifactId>
  <version>1.0.3</version>

  <parent>
    <groupId>io.spring.platform</groupId>
    <artifactId>platform-bom</artifactId>
    <version>Cairo-SR5</version>
  </parent>

  <licenses>
    <license>
      <name>GNU Library or Lesser General Public License (LGPL)</name>
    </license>
  </licenses>

  <scm>
    <connection>
      scm:git:https://${env.GITHUB_USER}:${env.GITHUB_TOKEN}@github.com/molgenis/vcf-io.git
    </connection>
    <url>https://github.com/molgenis/vcf-io</url>
    <tag>vcf-io-1.0.3</tag>
  </scm>

  <properties>
    <!-- authentication for release scm plugin -->
    <project.scm.id>github</project.scm.id>

    <commons-lang3.version>3.7</commons-lang3.version>
    <guava.version>25.0-jre</guava.version>
    <picard.version>1.102.0</picard.version>

    <mockito.version>2.7.22</mockito.version>
    <testng.version>6.8</testng.version>

    <pgp-maven-plugin.version>1.1</pgp-maven-plugin.version>
    <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
    <release-maven-plugin.version>2.5.3</release-maven-plugin.version>
    <jacoco-maven-plugin.version>0.8.1</jacoco-maven-plugin.version>
    <sonar-maven-plugin.version>3.5.0.1254</sonar-maven-plugin.version>
    <fmt-maven-plugin.version>2.5.1</fmt-maven-plugin.version>

    <sonatype.id>sonatype-nexus-staging</sonatype.id>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.organization>molgenis</sonar.organization>
    <sonar.github.repository>molgenis/vcf-io</sonar.github.repository>
    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
    <sonar.java.codeCoveragePlugin>jacoco</sonar.java.codeCoveragePlugin>
  </properties>

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

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
        </plugin>
        <!-- sign artifacts -->
        <plugin>
          <groupId>org.kohsuke</groupId>
          <artifactId>pgp-maven-plugin</artifactId>
          <version>${pgp-maven-plugin.version}</version>
        </plugin>
        <!-- deploy to sonatype nexus -->
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${nexus-staging-maven-plugin.version}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>${sonatype.id}</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${release-maven-plugin.version}</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <scmCommentPrefix>[ci skip] [maven-release-plugin]${line.separator}</scmCommentPrefix>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>${fmt-maven-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>pre-unit-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>post-unit-test</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
        <version>${sonar-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <!-- sign in a non-interactive way -->
        <groupId>org.kohsuke</groupId>
        <artifactId>pgp-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>deploy</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_annotations</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.j2objc</groupId>
            <artifactId>j2objc-annotations</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-annotations</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.checkerframework</groupId>
            <artifactId>checker-compat-qual</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.utgenome.thirdparty</groupId>
        <artifactId>picard</artifactId>
        <version>${picard.version}</version>
        <exclusions>
          <exclusion>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>org.utgenome.thirdparty</groupId>
      <artifactId>picard</artifactId>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>