<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright Terracotta, Inc.

    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.

-->
<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.18</version>
  </parent>

  <artifactId>platform-root</artifactId>
  <version>5.8.7</version>
  <packaging>pom</packaging>

  <properties>
    <maven.version>3.6.3</maven.version>
    <slf4j.version>1.7.25</slf4j.version>
    <logback.version>1.2.3</logback.version>
    <terracotta-apis.version>1.8.1</terracotta-apis.version>
    <terracotta-configuration.version>10.7.1</terracotta-configuration.version>
    <passthrough-testing.version>1.8.2</passthrough-testing.version>
    <terracotta-core.version>5.8.3</terracotta-core.version>
    <tripwire.version>1.0.2</tripwire.version>
    <galvan.version>1.6.3</galvan.version>
    <angela.version>3.1.24</angela.version>
    <statistics.version>2.1</statistics.version>
    <jackson.version>2.12.4</jackson.version>
    <terracotta-utilities.version>0.0.9</terracotta-utilities.version>
    <test.parallel.forks>4</test.parallel.forks>
  </properties>

  <modules>
    <module>offheap-resource</module>
    <module>voltron-proxy</module>
    <module>concurrent-map-entity/common</module>
    <module>concurrent-map-entity/client</module>
    <module>concurrent-map-entity/server</module>
    <module>concurrent-map-entity/integration-tests</module>
    <module>communicator-support</module>
    <module>healthchecker-entity</module>
    <module>lease</module>
    <module>platform-base</module>
    <module>runnel</module>
    <module>management</module>
    <module>client-message-tracker</module>
    <module>common</module>
    <module>data-root-resource</module>
    <module>diagnostic</module>
    <module>dynamic-config</module>
    <module>galvan-platform-support</module>
    <module>kit</module>
    <module>docs</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>2.23.4</version>
      </dependency>
      <dependency>
        <groupId>org.skyscreamer</groupId>
        <artifactId>jsonassert</artifactId>
        <version>1.5.0</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>statistics</artifactId>
        <version>${statistics.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>terracotta-utilities-test-tools</artifactId>
        <version>${terracotta-utilities.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>terracotta-utilities-tools</artifactId>
        <version>${terracotta-utilities.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>terracotta-utilities-port-chooser</artifactId>
        <version>${terracotta-utilities.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta.internal</groupId>
        <artifactId>tc-config-parser</artifactId>
        <version>${terracotta-configuration.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta.internal</groupId>
        <artifactId>common-spi</artifactId>
        <version>${terracotta-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta.internal</groupId>
        <artifactId>management</artifactId>
        <version>${terracotta-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta.internal</groupId>
        <artifactId>client-runtime</artifactId>
        <version>${terracotta-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta.internal</groupId>
        <artifactId>voter</artifactId>
        <version>${terracotta-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta.internal</groupId>
        <artifactId>configuration-provider</artifactId>
        <version>${terracotta-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>packaging-support</artifactId>
        <version>${terracotta-apis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>connection-api</artifactId>
        <version>${terracotta-apis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>entity-client-api</artifactId>
        <version>${terracotta-apis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>standard-cluster-services</artifactId>
        <version>${terracotta-apis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>entity-server-api</artifactId>
        <version>${terracotta-apis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>entity-common-api</artifactId>
        <version>${terracotta-apis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>passthrough-server</artifactId>
        <version>${passthrough-testing.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>monitoring-support</artifactId>
        <version>${terracotta-apis.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>test-interfaces</artifactId>
        <version>${galvan.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>galvan</artifactId>
        <version>${galvan.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta.internal</groupId>
        <artifactId>galvan-support</artifactId>
        <version>${terracotta-core.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>angela</artifactId>
        <version>${angela.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</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.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>org.terracotta</groupId>
        <artifactId>tc-tripwire-plugin</artifactId>
        <version>${tripwire.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.xmlunit</groupId>
        <artifactId>xmlunit-matchers</artifactId>
        <version>2.6.3</version>
      </dependency>
      <dependency>
        <groupId>com.beust</groupId>
        <artifactId>jcommander</artifactId>
        <version>1.78</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jvnet.jaxb2.maven2</groupId>
          <artifactId>maven-jaxb2-plugin</artifactId>
          <version>0.14.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <excludeDefaultDirectories>false</excludeDefaultDirectories>
            <filesets>
              <fileset>
                <directory>.</directory>
                <includes>
                  <include>dependency-reduced-pom.xml</include>
                </includes>
              </fileset>
            </filesets>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
          <configuration>
            <archive>
              <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.5.4</version>
          <configuration>
            <archive>
              <manifest>
                <addClasspath>true</addClasspath>
              </manifest>
            </archive>
          </configuration>
          <executions>
            <execution>
              <phase>process-classes</phase>
              <goals>
                <goal>manifest</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
          <executions>
            <execution>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </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.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </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>
                    <requireJavaVersion>
                      <version>[${java.build.version},)</version>
                    </requireJavaVersion>
                    <requireMavenVersion>
                      <version>[${maven.version},)</version>
                    </requireMavenVersion>
                    <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>
  </profiles>

  <repositories>
    <repository>
      <id>terracotta-releases</id>
      <url>https://www.terracotta.org/download/reflector/releases</url>
    </repository>
  </repositories>

  <scm>
    <connection>scm:git:https://github.com/Terracotta-OSS/terracotta-platform.git</connection>
    <developerConnection>scm:git:git@github.com:Terracotta-OSS/terracotta-platform.git</developerConnection>
  </scm>

  <developers>
    <developer>
      <name>Myron Scott</name>
      <email>Myron.Scott@terracottatech.com</email>
      <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>
      <email>venkatasairam.madduri@softwareag.com</email>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Mobasherul Haque</name>
      <email>mdmobasherul.haque@softwareag.com</email>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Saurabh Agarwal</name>
      <email>saurabh.agarwal@softwareag.com</email>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Mathieu Carbou</name>
      <email>mathieu.carbou@softwareag.com</email>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
  </developers>

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

</project>
