<?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.vertx</groupId>
    <artifactId>vertx-ext-parent</artifactId>
    <version>11</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <artifactId>vertx-mysql-postgresql-client</artifactId>
  <version>3.0.0-milestone6</version>

  <name>Vert.x MySQL/PostgreSQL Client</name>

  <properties>
    <stack.version>3.0.0-milestone6</stack.version>
    <scala.version>2.11.4</scala.version>
    <asyncdriver.version>0.2.15</asyncdriver.version>
  </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-sql-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>${scala.version}</version>
    </dependency>
    <dependency>
      <groupId>com.github.mauricio</groupId>
      <artifactId>postgresql-async_2.11</artifactId>
      <version>${asyncdriver.version}</version>
    </dependency>
    <dependency>
      <groupId>com.github.mauricio</groupId>
      <artifactId>mysql-async_2.11</artifactId>
      <version>${asyncdriver.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-rx-java</artifactId>
      <optional>true</optional>
      <version>${stack.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-docgen</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codetrans</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <version>4.11</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Copy resources after compilation phase as we generate JS in src/main/resources -->
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>default-resources</id>
            <phase>process-classes</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
          <systemPropertyVariables>
            <vertx.test.timeout>60</vertx.test.timeout>
            <io.netty.leakDetectionLevel>PARANOID</io.netty.leakDetectionLevel>
          </systemPropertyVariables>
          <argLine>-server -Xms128m -Xmx1024m -XX:NewRatio=2</argLine>
          <excludes>
            <exclude>**/ScratchPad.java</exclude>
            <!-- Exclude Mongo tests until driver API is more stable -->
            <exclude>**/ext/mongo/**</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <phase>compile</phase>
          </execution>
          <execution>
            <id>test-compile</id>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <phase>test-compile</phase>
          </execution>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
