<!--
  ~ Copyright 2021 DataRobot, Inc. and its affiliates.
  ~
  ~ All rights reserved.
  ~
  ~ DataRobot, Inc. Confidential.
  ~
  ~ This is unpublished proprietary source code of DataRobot, Inc. and its affiliates.
  ~
  ~ The copyright notice above does not evidence any actual or intended publication of such source code.
  ~
  -->
<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.datarobot</groupId>
  <artifactId>datarobot-prediction</artifactId>
  <version>${revision}</version>
  <packaging>jar</packaging>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>Prediction API</description>
  <url>https://datarobot.com</url>

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

  <developers>
    <developer>
      <name>DataRobot</name>
      <email>info@datarobot.com</email>
      <organization>DataRobot inc.</organization>
      <organizationUrl>https://www.datarobot.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/datarobot</connection>
    <developerConnection>scm:git:ssh://github.com:datarobot</developerConnection>
    <url>https://github.com/datarobot</url>
  </scm>

  <properties>
    <revision>2.3.4</revision>
    <slf4j.version>2.0.3</slf4j.version>
    <junit.version>4.13.2</junit.version>
    <mockito.version>4.8.1</mockito.version>
    <univocity-parsers.version>2.9.1</univocity-parsers.version>
  </properties>

  <dependencies>
    <!-- CSV -->
    <dependency>
      <groupId>com.univocity</groupId>
      <artifactId>univocity-parsers</artifactId>
      <version>${univocity-parsers.version}</version>
    </dependency>
    <!-- Logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <!-- Testing -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- Mocking -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-inline</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>8</source>
          <target>8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
	   <version>3.3.0</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>2.16.0</version>
        <configuration>
          <configFile>${project.basedir}/eclipse-java-google-style.xml</configFile>
          <encoding>UTF-8</encoding>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.15.3</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>4.1</version>
        <configuration>
          <header>license-header.txt</header>
          <includes>
            <include>src/test/java/**</include>
            <include>src/main/java/**</include>
          </includes>
          <excludes>
            <exclude>src/test/resources/**</exclude>
            <exclude>src/main/resources/**</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.9.1</version>
        <dependencies>
          <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.17.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>artifactory</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <distributionManagement>
        <repository>
          <id>datarobot-maven-dev</id>
          <url>https://artifactory.int.datarobot.com/artifactory/datarobot-maven-dev</url>
        </repository>
        <snapshotRepository>
          <id>datarobot-maven-snapshots</id>
          <url>https://artifactory.int.datarobot.com/artifactory/datarobot-maven-snapshots</url>
        </snapshotRepository>
      </distributionManagement>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>https://artifactory.int.datarobot.com/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots/>
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>https://artifactory.int.datarobot.com/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>plugins-release</name>
          <url>https://artifactory.int.datarobot.com/artifactory/plugins-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots/>
          <id>snapshots</id>
          <name>plugins-release</name>
          <url>https://artifactory.int.datarobot.com/artifactory/plugins-release</url>
        </pluginRepository>
      </pluginRepositories>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.1</version>
            <configuration>
              <doctitle>API for ${project.name} ${project.version}</doctitle>
              <windowtitle>API for ${project.name} ${project.version}</windowtitle>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sonatype</id>
      <distributionManagement>
        <snapshotRepository>
          <id>datarobot-sonatype-snapshots</id>
          <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
          <id>datarobot-sonatype-releases</id>
          <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.1</version>
            <configuration>
              <doctitle>API for ${project.name} ${project.version}</doctitle>
              <windowtitle>API for ${project.name} ${project.version}</windowtitle>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
            <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>3.0.1</version>
            <configuration>
              <!--gpg.keyname is unique for each user and should be defined in a settings.xml -->
              <keyname>${gpg.keyname}</keyname>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.13</version>
            <extensions>true</extensions>
            <configuration>
              <!--datarobot-sonatype-snapshots and datarobot-sonatype-releases have the same credentials
              you can specify any of those-->
              <serverId>datarobot-sonatype-snapshots</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>false</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <!--We must publish sources jar to bypass sonatype rules. But the sources jar can be empty, according to the rules and Apache 2.0 Licence ;)-->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <configuration>
              <excludes>**/*.scala,**/*.java</excludes>
            </configuration>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
