<?xml version="1.0"?>
<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-jgroups</artifactId>
  <version>3.3.2</version>

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

  <properties>
    <stack.version>3.3.2</stack.version>
    <jgroups.version>3.6.8.Final</jgroups.version>
    <junit.version>4.12</junit.version>
    <mockito.version>1.9.5</mockito.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>


  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jgroups</groupId>
      <artifactId>jgroups</artifactId>
      <version>${jgroups.version}</version>
    </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-docgen</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-rx-java</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codetrans</artifactId>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <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>-Xmx1200M</argLine>
            <forkCount>1</forkCount>
            <reuseForks>true</reuseForks>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>coverage</id>
      <build>
        <plugins>
          <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>
                <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
              </systemPropertyVariables>
              <!-- Needs to be small enough to run in a EC2 1.7GB small instance -->
              <!-- append computed argLine computed by jacoco -->
              <argLine>-Xmx1200M @{surefireArgLine}</argLine>
              <forkCount>1</forkCount>
              <reuseForks>true</reuseForks>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
