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

  <groupId>com.kx</groupId>
  <artifactId>javakdb</artifactId>
  <version>2.0</version>
  <packaging>jar</packaging>

  <parent>
    <groupId>com.kx.multi</groupId>
    <artifactId>JavaKdbModules</artifactId>
    <version>2.0</version>
  </parent>

  <name>JavaKDB</name>
  <description>KDB+ IPC interface for the Java programming language</description>
  <url>https://github.com/KxSystems/javakdb</url>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Fusion Developer</name>
      <email>fusion@kx.com</email>
      <organization>KX Systems</organization>
      <organizationUrl>http://www.kx.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/KxSystems/javakdb.git</connection>
    <developerConnection>scm:git:ssh://github.com:KxSystems/javakdb.git</developerConnection>
    <url>https://github.com/KxSystems/javakdb/tree/master</url>
  </scm>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>[4.13.1,)</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <!-- Java Compiler -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <compilerArgs>
            <arg>-Xlint:deprecation</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <source>8</source>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
          <configuration>
              <skip>${maven.test.skip}</skip>
              <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
              <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
              <output>file</output>
              <append>false</append>
          </configuration>
          <executions>
              <execution>
                  <id>jacoco-initialize</id>
                  <goals>
                      <goal>prepare-agent</goal>
                  </goals>
                  <phase>test-compile</phase>
              </execution>
              <execution>
                  <id>jacoco-site</id>
                  <phase>verify</phase>
                  <goals>
                      <goal>report</goal>
                  </goals>
              </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>net.ju-n.maven.plugins</groupId>
          <artifactId>checksum-maven-plugin</artifactId>
          <version>1.3</version>
          <executions>
              <execution>
                  <id>checksum-maven-plugin-files</id>
                  <phase>package</phase>
                  <goals>
                      <goal>files</goal>
                  </goals>
              </execution>
          </executions>
          <configuration>
              <fileSets>
                  <fileSet>
                  <directory>${project.build.directory}</directory>
                  <includes>
                      <include>*.jar</include>
                  </includes>
                  </fileSet>
              </fileSets>
              <algorithms>
                  <algorithm>SHA-1</algorithm>
                  <algorithm>MD5</algorithm>
              </algorithms>
          </configuration>
        </plugin>
      </plugins>
  </build>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>mvnRelease</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.4.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <tokenAuth>true</tokenAuth>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
