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

  <parent>
    <groupId>io.reactiverse</groupId>
    <artifactId>es4x-parent</artifactId>
    <version>0.13.2</version>
    <relativePath>..</relativePath>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <artifactId>es4x</artifactId>
  <version>0.13.2</version>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

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

  <profiles>
    <profile>
      <id>graaljs</id>
      <activation>
        <file>
          <missing>${java.home}/../GRAALVM-README.md</missing>
        </file>
      </activation>
      <dependencies>
        <!-- GraalVM runtime -->
        <dependency>
          <groupId>org.graalvm.truffle</groupId>
          <artifactId>truffle-api</artifactId>
          <version>${graalvm.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.graalvm.js</groupId>
          <artifactId>js</artifactId>
          <version>${graalvm.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.graalvm.tools</groupId>
          <artifactId>profiler</artifactId>
          <version>${graalvm.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.graalvm.tools</groupId>
          <artifactId>chromeinspector</artifactId>
          <version>${graalvm.version}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
      <version>${stack.version}</version>
    </dependency>
    <dependency>
      <groupId>org.graalvm.sdk</groupId>
      <artifactId>graal-sdk</artifactId>
      <version>${graalvm.version}</version>
      <scope>provided</scope>
    </dependency>
    <!-- testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-unit</artifactId>
      <version>${stack.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-hazelcast</artifactId>
      <version>${stack.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.amashchenko.maven.plugin</groupId>
        <artifactId>gitflow-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.5</version>
        <configuration>
          <skip>${env.SKIP_JACOCO}</skip>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>io.reactiverse.es4x.ES4X</mainClass>
            </manifest>
            <manifestEntries>
              <url>${project.url}</url>
              <Default-Verticle-Factory>js</Default-Verticle-Factory>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
