<?xml version="1.0" encoding="UTF-8"?>
<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>io.vertx</groupId>
    <artifactId>vertx-ext-parent</artifactId>
    <version>20</version>
  </parent>

  <artifactId>vertx-ignite</artifactId>
  <version>3.3.2</version>

  <name>Vert.x Ignite Cluster Manager</name>

  <properties>
    <stack.version>3.3.2</stack.version>
    <ignite.version>1.6.0</ignite.version>

    <asciidoc.dir>${project.basedir}/src/main/asciidoc</asciidoc.dir>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-dependencies</artifactId>
        <version>${stack.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.ignite</groupId>
      <artifactId>ignite-core</artifactId>
      <version>${ignite.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.ignite</groupId>
      <artifactId>ignite-spring</artifactId>
      <version>${ignite.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-aop</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-tx</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-jdbc</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-docgen</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codetrans</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codegen</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-lang-groovy</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-lang-ruby</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-lang-js</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-rx-java</artifactId>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <annotationProcessors>
                <annotationProcessor>io.vertx.docgen.JavaDocGenProcessor</annotationProcessor>
              </annotationProcessors>
              <compilerArgs>
                <arg>-Adocgen.output=${asciidoc.dir}/$lang</arg>
                <arg>-Amaven.groupId=${project.groupId}</arg>
                <arg>-Amaven.artifactId=${project.artifactId}</arg>
                <arg>-Amaven.version=${project.version}</arg>
              </compilerArgs>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
        <configuration>
          <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
          <systemPropertyVariables>
            <io.netty.leakDetectionLevel>PARANOID</io.netty.leakDetectionLevel>
            <buildDirectory>${project.build.directory}</buildDirectory>
            <vertxVersion>${project.version}</vertxVersion>
          </systemPropertyVariables>
         <!-- Needs to be small enough to run in a EC2 1.7GB small instance -->
          <argLine>-Xms512M -Xmx1200M -DIGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE=1000 @{surefireArgLine}</argLine>
          <forkCount>1</forkCount>
          <reuseForks>true</reuseForks>
        </configuration>
      </plugin>

    </plugins>
  </build>

</project>
