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

  <groupId>cn.net.polyglot</groupId>
  <artifactId>social-vertex</artifactId>
  <version>0.7</version>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>

    <kotlin.version>1.4.10</kotlin.version>
    <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
    <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
    <vertx.version>4.0.2</vertx.version>
    <es4x.version>0.14.0</es4x.version>
    <vertx.verticle>cn.net.polyglot.MainVerticle</vertx.verticle>
<!--    <vertx.verticle>cn/net/polyglot/main-verticle.js</vertx.verticle>-->
  </properties>

  <dependencies>
    <!-- es4x dependencies start -->
<!--    <dependency>-->
<!--      <groupId>io.reactiverse</groupId>-->
<!--      <artifactId>es4x-vertx-stack</artifactId>-->
<!--      <version>${es4x.version}</version>-->
<!--    </dependency>-->
<!--    <dependency>-->
<!--      <groupId>io.reactiverse</groupId>-->
<!--      <artifactId>es4x-pm</artifactId>-->
<!--      <version>${es4x.version}</version>-->
<!--      <scope>provided</scope>-->
<!--    </dependency>-->
    <!-- es4x dependencies end -->

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-config</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-lang-kotlin</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-lang-kotlin-coroutines</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-client</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-templ-thymeleaf</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>32.0.0-jre</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.30</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-nop</artifactId>
      <version>1.7.30</version>
    </dependency>
    <!--test dependencies-->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-unit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>4.0.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

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

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/main/javascript</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>io.reactiverse</groupId>
        <artifactId>vertx-maven-plugin</artifactId>
        <version>1.0.23</version>
        <executions>
          <execution>
            <id>vmp</id>
            <goals>
              <goal>initialize</goal>
              <goal>package</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <redeploy>true</redeploy>
          <!--<debugSuspend>true</debugSuspend>-->
        </configuration>
      </plugin>

      <plugin>
        <artifactId>kotlin-maven-plugin</artifactId>
        <groupId>org.jetbrains.kotlin</groupId>
        <version>${kotlin.version}</version>
        <configuration>
          <jvmTarget>${kotlin.compiler.jvmTarget}</jvmTarget>
        </configuration>
        <executions>
          <execution>
            <id>compile</id>
            <phase>process-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <sourceDirs>
                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                <sourceDir>${project.basedir}/src/main/java</sourceDir>
              </sourceDirs>
            </configuration>
          </execution>
          <execution>
            <id>test-compile</id>
            <goals>
              <goal>test-compile</goal>
            </goals>
            <configuration>
              <sourceDirs>
                <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                <sourceDir>${project.basedir}/src/test/java</sourceDir>
              </sourceDirs>
            </configuration>
          </execution>
        </executions>
      </plugin>
<!--      <plugin>-->
<!--        <groupId>org.codehaus.mojo</groupId>-->
<!--        <artifactId>exec-maven-plugin</artifactId>-->
<!--        <version>3.0.0</version>-->
<!--        <executions>-->
<!--          <execution>-->
<!--            <id>generate-asm</id>-->
<!--            <phase>compile</phase>-->
<!--            <goals>-->
<!--              <goal>java</goal>-->
<!--            </goals>-->
<!--          </execution>-->
<!--        </executions>-->
<!--        <configuration>-->
<!--          <mainClass>io.reactiverse.es4x.cli.VertxPatch</mainClass>-->
<!--          <arguments>-->
<!--            <argument>${vertx.version}</argument>-->
<!--            <argument>${project.build.outputDirectory}</argument>-->
<!--          </arguments>-->
<!--          <classpathScope>compile</classpathScope>-->
<!--        </configuration>-->
<!--      </plugin>-->
    </plugins>
  </build>

</project>