<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ The contents of this file are subject to the Terracotta Public 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://terracotta.org/legal/terracotta-public-license.
  ~
  ~ Software distributed under the License is distributed on an "AS IS" basis,
  ~ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
  ~ the specific language governing rights and limitations under the License.
  ~
  ~ The Covered Software is Angela.
  ~
  ~ The Initial Developer of the Covered Software is
  ~ Terracotta, Inc., a Software AG company
  -->

<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>

  <parent>
    <groupId>org.terracotta</groupId>
    <artifactId>terracotta-parent</artifactId>
    <version>5.20</version>
  </parent>

  <artifactId>angela-root</artifactId>
  <version>3.3.16</version>
  <packaging>pom</packaging>
  <name>angela</name>

  <description>Distributed control framework to handle a Terracotta cluster and tests clients</description>
  <url>https://github.com/Terracotta-OSS/angela</url>

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

  <properties>
    <maven.version>3.6.3</maven.version>
    <terracotta-utilities.version>0.0.10</terracotta-utilities.version>

    <!-- Third-party dependencies -->
    <ignite.version>2.12.0</ignite.version>
    <json-path.version>4.3.1</json-path.version>
    <hamcrest.version>1.3</hamcrest.version>
    <junit.version>4.12</junit.version>
    <slf4j-api.version>1.7.25</slf4j-api.version>
    <sshj.version>0.32.0</sshj.version>
    <awaitility.version>4.0.3</awaitility.version>
    <commons-io.version>2.7</commons-io.version>
    <commons-compress.version>1.20</commons-compress.version>
    <zt-process-killer.version>1.10</zt-process-killer.version>
    <zt-exec.version>1.12</zt-exec.version>
    <logback-classic.version>1.2.3</logback-classic.version>
    <netcrusher-core.version>0.10</netcrusher-core.version>
    <jaxb-runtime.version>2.3.3</jaxb-runtime.version>
    <jna.version>5.9.0</jna.version>
  </properties>

  <modules>
    <module>common</module>
    <module>client-internal</module>
    <module>agent-lib</module>
    <module>agent</module>
    <module>docs</module>
    <module>angela</module>
    <module>integration-test</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>angela-common</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>angela-client-internal</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>angela-agent-lib</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>angela</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>angela-ee</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>terracotta-utilities-port-chooser</artifactId>
        <version>${terracotta-utilities.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>terracotta-utilities-test-tools</artifactId>
        <version>${terracotta-utilities.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.ignite</groupId>
        <artifactId>ignite-core</artifactId>
        <version>${ignite.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.ignite</groupId>
        <artifactId>ignite-slf4j</artifactId>
        <version>${ignite.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-api.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-inline</artifactId>
        <version>3.3.3</version>
      </dependency>
      <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>json-path</artifactId>
        <version>${json-path.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.hierynomus</groupId>
        <artifactId>sshj</artifactId>
        <version>${sshj.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>${hamcrest.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>${awaitility.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.zeroturnaround</groupId>
        <artifactId>zt-process-killer</artifactId>
        <version>${zt-process-killer.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.zeroturnaround</groupId>
            <artifactId>zt-exec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.zeroturnaround</groupId>
        <artifactId>zt-exec</artifactId>
        <version>${zt-exec.version}</version>
        <exclusions>
          <exclusion>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>${commons-compress.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback-classic.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.netcrusherorg</groupId>
        <artifactId>netcrusher-core</artifactId>
        <version>${netcrusher-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jaxb</groupId>
        <artifactId>jaxb-runtime</artifactId>
        <version>${jaxb-runtime.version}</version>
      </dependency>
      <dependency>
        <groupId>net.java.dev.jna</groupId>
        <artifactId>jna</artifactId>
        <version>${jna.version}</version>
      </dependency>
      <dependency>
        <groupId>net.java.dev.jna</groupId>
        <artifactId>jna-platform</artifactId>
        <version>${jna.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>${java.build.version}</source>
            <target>${java.build.version}</target>
            <showWarnings>true</showWarnings>
            <showDeprecation>true</showDeprecation>
            <failOnWarning>true</failOnWarning>
            <compilerArgs>
              <arg>-Xlint:all</arg>
              <!-- -path is required because of the class-path manifest entries generated (jars won't be found) -->
              <arg>-Xlint:-path</arg>
              <arg>-Werror</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.2.4</version>
        </plugin>
        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <version>1.5.6</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
          <extensions>true</extensions>
          <configuration>
            <!-- The Base URL of Nexus instance where we want to stage -->
            <nexusUrl>https://oss.sonatype.org</nexusUrl>
            <!-- The server "id" element from settings to use authentication from -->
            <serverId>sonatype-nexus-staging</serverId>
            <skipNexusStagingDeployMojo>${maven.deploy.skip}</skipNexusStagingDeployMojo>
            <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <!-- default profile including toolchain, javadoc, findbugs, license check, enforcer, etc -->
    <profile>
      <id>default</id>
      <activation>
        <property>
          <name>fast</name>
          <value>!true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <dependencyConvergence>
                      <uniqueVersions>true</uniqueVersions>
                    </dependencyConvergence>
                    <bannedDependencies>
                      <excludes>
                        <exclude>com.github.stefanbirkner:system-rules</exclude>
                      </excludes>
                    </bannedDependencies>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.1</version>
            <configuration>
              <quiet>true</quiet>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- Profile to sign artifacts with a PGP key (using GPG).
           Must be activated for sonatype releases -->
      <id>sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>Terracotta Release Engineer</keyname>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <id>terracotta-releases</id>
      <url>https://repo.terracotta.org/maven2</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>terracotta-os-snapshots</id>
      <uniqueVersion>false</uniqueVersion>
      <name>Terracotta OS Snapshots Repository</name>
      <url>${terracotta-os-snapshots-url}</url>
    </snapshotRepository>
  </distributionManagement>

  <scm>
    <url>https://github.com/Terracotta-OSS/angela</url>
    <connection>scm:git:https://github.com/Terracotta-OSS/angela.git</connection>
    <developerConnection>scm:git:https://github.com/Terracotta-OSS/angela.git</developerConnection>
  </scm>

  <developers>
    <developer>
      <name>Aurelien Broszniowski</name>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Saurabh Agarwal</name>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Alexander Komarov</name>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Albin Suresh</name>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Chris Dennis</name>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Md Mobasherul Haque</name>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Venkata Sairam Madduri</name>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
  </developers>
</project>
