<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>Spotify Styx</name>

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

  <artifactId>styx</artifactId>
  <packaging>pom</packaging>
  <version>1.0.99</version>

  <properties>
    <apollo.version>1.3.2</apollo.version>
    <jackson.version>2.8.8</jackson.version>
    <checkstyle.config.location>checkstyle.xml</checkstyle.config.location>
    <checkstyle.version>2.17</checkstyle.version>
    <semantic-metrics.version>0.11.2</semantic-metrics.version>
  </properties>

  <repositories>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
  </repositories>

  <modules>
    <module>styx-api-service</module>
    <module>styx-scheduler-service</module>
    <module>styx-cli</module>
    <module>styx-client</module>
    <module>styx-common</module>
    <module>styx-test</module>
    <module>styx-standalone-service</module>
    <module>styx-report</module>
  </modules>

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

  <developers>
    <developer>
      <id>rouz</id>
      <email>rouz@spotify.com</email>
      <name>Rouzbeh Delavari</name>
    </developer>
    <developer>
      <id>ranic</id>
      <email>ranic@spotify.com</email>
      <name>Tina Ranic</name>
    </developer>
    <developer>
      <id>fdema</id>
      <email>fdema@spotify.com</email>
      <name>Fabrizio Demaria</name>
    </developer>
    <developer>
      <id>jocke</id>
      <email>jocke@spotify.com</email>
      <name>Joakim Bergman</name>
    </developer>
    <developer>
      <id>dano</id>
      <email>dano@spotify.com</email>
      <name>Daniel Norberg</name>
    </developer>
    <developer>
      <id>honnix</id>
      <email>honnix@spotify.com</email>
      <name>Hongxin Liang</name>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/spotify/styx</url>
    <connection>scm:git:git@github.com:spotify/styx.git</connection>
    <developerConnection>scm:git:git@github.com:spotify/styx.git</developerConnection>
    <tag>v1.0.99</tag>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.spotify</groupId>
        <artifactId>apollo-bom</artifactId>
        <version>${apollo.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- general utility libs -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>19.0</version>
      </dependency>
      <dependency>
        <groupId>com.github.rholder</groupId>
        <artifactId>guava-retrying</artifactId>
        <version>2.0.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.auto.value</groupId>
        <artifactId>auto-value</artifactId>
        <version>1.5.3</version>
      </dependency>
      <dependency>
        <groupId>io.norberg</groupId>
        <artifactId>auto-matter</artifactId>
        <version>0.14.1</version>
      </dependency>
      <dependency>
        <groupId>com.github.sviperll</groupId>
        <artifactId>adt4j</artifactId>
        <version>3.2</version>
      </dependency>
      <dependency>
        <groupId>com.spotify</groupId>
        <artifactId>completable-futures</artifactId>
        <version>0.1.0</version>
      </dependency>
      <dependency>
        <groupId>com.javaslang</groupId>
        <artifactId>javaslang</artifactId>
        <version>2.0.0-RC2</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jdk8</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-yaml</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-parameter-names</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-jaxb-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>io.norberg</groupId>
        <artifactId>auto-matter-jackson</artifactId>
        <version>0.14.1</version>
      </dependency>
      <dependency>
        <groupId>com.cronutils</groupId>
        <artifactId>cron-utils</artifactId>
        <version>7.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.25</version>
      </dependency>
      <dependency>
        <groupId>com.spotify.metrics</groupId>
        <artifactId>semantic-metrics-core</artifactId>
        <version>${semantic-metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>com.spotify.metrics</groupId>
        <artifactId>semantic-metrics-ffwd-reporter</artifactId>
        <version>${semantic-metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.kabutz</groupId>
        <artifactId>javaspecialists</artifactId>
        <version>055ddfd5d6d9</version>
      </dependency>

      <!-- cli -->
      <dependency>
        <groupId>org.fusesource.jansi</groupId>
        <artifactId>jansi</artifactId>
        <version>1.11</version>
      </dependency>
      <dependency>
        <groupId>net.sourceforge.argparse4j</groupId>
        <artifactId>argparse4j</artifactId>
        <version>0.7.0</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.25</version>
      </dependency>

      <!-- styx client libs -->
      <dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>okhttp</artifactId>
        <version>3.9.0</version>
      </dependency>

      <!-- external clients libs -->
      <dependency>
        <groupId>com.spotify</groupId>
        <artifactId>docker-client</artifactId>
        <version>3.5.0</version>
      </dependency>
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>kubernetes-client</artifactId>
        <version>2.2.13</version>
      </dependency>
      <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-iam</artifactId>
        <version>v1-rev205-1.22.0</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.guava</groupId>
            <artifactId>guava-jdk5</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-container</artifactId>
        <version>v1beta1-rev38-1.22.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.cloud</groupId>
        <artifactId>google-cloud-datastore</artifactId>
        <version>1.0.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.cloud.bigtable</groupId>
        <artifactId>bigtable-hbase-1.2</artifactId>
        <version>0.9.6.2</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-tcnative-boringssl-static</artifactId>
        <version>1.1.33.Fork26</version>
      </dependency>
      <dependency>
        <groupId>com.google.api</groupId>
        <artifactId>api-common</artifactId>
        <version>1.1.0</version>
      </dependency>

      <!-- test libs -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.10.19</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>com.github.npathai</groupId>
        <artifactId>hamcrest-optional</artifactId>
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>org.jmock</groupId>
        <artifactId>jmock</artifactId>
        <version>2.8.2</version>
      </dependency>
      <dependency>
        <groupId>com.jayway.jsonpath</groupId>
        <artifactId>json-path-assert</artifactId>
        <version>2.2.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.jcabi</groupId>
        <artifactId>jcabi-matchers</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>2.0.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>pl.pragmatists</groupId>
        <artifactId>JUnitParams</artifactId>
        <version>1.1.0</version>
        <scope>test</scope>
      </dependency>

      <!-- version resolution -->
      <dependency>
        <groupId>com.spotify</groupId>
        <artifactId>dns</artifactId>
        <version>3.1.1</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.9.2</version>
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.9</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>2.5.1</version>
      </dependency>
      <dependency>
        <groupId>com.squareup.okio</groupId>
        <artifactId>okio</artifactId>
        <version>1.13.0</version>
      </dependency>
      <dependency>
        <groupId>com.squareup.okhttp</groupId>
        <artifactId>okhttp</artifactId>
        <version>2.7.5</version>
      </dependency>
      <dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client</artifactId>
        <version>1.22.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client</artifactId>
        <version>1.22.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client</artifactId>
        <version>1.22.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-jackson2</artifactId>
        <version>1.22.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>3.2.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.1</version>
      </dependency>
      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>1.3.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <argLine>-Xmx256m ${argLine}</argLine>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${checkstyle.version}</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <configuration>
              <configLocation>${checkstyle.config.location}</configLocation>
              <encoding>UTF-8</encoding>
              <consoleOutput>true</consoleOutput>
              <!-- Remove or switch to false to keep building even with checkstyle errors -->
              <failsOnError>true</failsOnError>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>

      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.9</version>
        <configuration>
          <excludes>
            <exclude>**/AutoValue_*.class</exclude>
            <exclude>**/*Builder.class</exclude>
            <exclude>**/*$*.class</exclude>
            <exclude>com/spotify/styx/model/Event.class</exclude>
            <exclude>com/spotify/styx/state/Trigger.class</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>verify</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <compilerId>javac-with-errorprone</compilerId>
          <forceJavacCompilerUse>true</forceJavacCompilerUse>
          <source>1.8</source>
          <target>1.8</target>
          <showWarnings>true</showWarnings>
          <compilerArgs>
            <arg>-Xlint:all</arg>
            <arg>-Xep:RemoveUnusedImports:ERROR</arg>
            <arg>-Xep:PrivateConstructorForUtilityClass:ERROR</arg>
            <arg>-Xep:FieldMissingNullable:ERROR</arg>
            <arg>-Xep:MultipleTopLevelClasses:ERROR</arg>
            <arg>-Xep:MultipleUnaryOperatorsInMethodCall:ERROR</arg>
            <arg>-Xep:PackageLocation:ERROR</arg>
            <arg>-Xep:SwitchDefault:ERROR</arg>
            <arg>-Xep:ThrowsUncheckedException:ERROR</arg>
            <arg>-Xep:TypeParameterNaming:ERROR</arg>
            <arg>-Xep:UngroupedOverloads:WARN</arg>
            <arg>-Xep:UnnecessaryStaticImport:ERROR</arg>
            <arg>-Xep:WildcardImport:ERROR</arg>
            <ark>-XepExcludedPaths:.*/target/generated.*</ark>
          </compilerArgs>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-javac-errorprone</artifactId>
            <version>2.8.2</version>
          </dependency>
          <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_core</artifactId>
            <version>2.2.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>
