<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <name>zoltar-parent</name>
  <artifactId>zoltar-parent</artifactId>
  <version>0.6.0-M4</version>
  <packaging>pom</packaging>

  <parent>
    <groupId>com.spotify</groupId>
    <artifactId>foss-root</artifactId>
    <version>15</version>
  </parent>

  <modules>
    <module>zoltar-bom</module>
    <module>zoltar-core</module>
    <module>zoltar-tensorflow</module>
    <module>zoltar-xgboost</module>
    <module>zoltar-featran</module>
    <module>zoltar-tests</module>
    <module>zoltar-api</module>
    <module>zoltar-metrics</module>
    <module>zoltar-mlengine</module>
    <module>zoltar-jmh</module>
    <!-- <module>examples/apollo-service-example</module> -->
    <module>examples/custom-metrics</module>
    <module>examples/mlengine-example</module>
    <module>examples/batch-predictor</module>
  </modules>

  <properties>
    <findbugs.excludeFilterFile>findbugsexclude.xml</findbugs.excludeFilterFile>
    <checkstyle.violationSeverity>error</checkstyle.violationSeverity>
  </properties>

  <scm>
    <url>https://github.com/spotify/zoltar</url>
    <connection>scm:git:git@github.com:spotify/zoltar.git</connection>
    <developerConnection>scm:git:git@github.com:spotify/zoltar.git</developerConnection>
    <tag>v0.6.0-M4</tag>
  </scm>

  <developers>
    <developer>
      <name>Filipe Regadas</name>
      <email>filiperegadas@gmail.com</email>
      <url>https://twitter.com/regadas</url>
    </developer>
  </developers>

  <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>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M5</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.6</version>
          <configuration>
            <excludes>
              <exclude>**/*Builder.*</exclude>
              <exclude>**/*Value.*</exclude>
              <exclude>**/*Factory.*</exclude>
              <exclude>**/di/*</exclude>
              <exclude>**/proto/*</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <configuration>
            <configLocation>checkstyle.xml</configLocation>
            <failsOnError>true</failsOnError>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.2.0</version>
          <configuration>
            <failOnError>false</failOnError>
            <links>
              <link>https://www.tensorflow.org/api_docs/java/reference</link>
              <link>http://dmlc.ml/docs/javadocs</link>
            </links>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <executions>
            <execution>
              <id>check-file-header</id>
              <phase>none</phase>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>2.12.1</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>apply</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <licenseHeader>
            <content>
/*
 * Copyright (C) 2019 Spotify AB
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
                    </content>
          </licenseHeader>
          <java>
            <googleJavaFormat>
              <version>1.6</version>
              <style>GOOGLE</style>
            </googleJavaFormat>
            <removeUnusedImports />
            <importOrder>
              <order>java,javax,org,com,com.spotify,</order>
            </importOrder>
          </java>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>quick</id>
      <activation>
        <property>
          <name>quick</name>
        </property>
      </activation>
      <properties>
        <checkstyle.skip>true</checkstyle.skip>
        <findbugs.skip>true</findbugs.skip>
        <jacoco.skip>true</jacoco.skip>
      </properties>
    </profile>
  </profiles>

</project>
