<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.apiman</groupId>
    <artifactId>apiman-gateway-platforms</artifactId>
    <version>1.1.2.Final</version>
  </parent>

  <artifactId>apiman-gateway-platforms-vertx</artifactId>
  <packaging>jar</packaging>
  <name>apiman-gateway-platforms-vertx</name>

  <properties>
    <!-- Set pullInDeps to true if you want any modules specified in the 'includes' and 'deploys' fields in your 
      mod.json to be automatically pulled in during packaging and added inside your module. Doing this means your module 
      won't download and install those dependencies at run-time when they're first requested. -->
    <vertx.pullInDeps>false</vertx.pullInDeps>

    <!-- Set createFatJar to true if you want to create a fat executable jar which contains the Vert.x binaries 
      along with the module so it can be run with java -jar <jarname> -->
    <vertx.createFatJar>false</vertx.createFatJar>

    <!--Vertx module name -->
    <module.name>${project.groupId}~${project.artifactId}~${project.version}</module.name>

    <!-- The directory where the module will be assembled - you can override this on the command line with -Dmods.directory=mydir -->
    <mods.directory>target/mods</mods.directory>
  </properties>

  <dependencies>
    <!--Vertx provided dependencies -->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-platform</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-hazelcast</artifactId>
      <scope>provided</scope>
    </dependency>

    <!--Test dependencies -->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>testtools</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- apiman dependencies -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-gateway-engine-beans</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-gateway-engine-core</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-gateway-api-rest</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-gateway-api-rest-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-gateway-test</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>apiman-test-common</artifactId>
    </dependency>

    <!-- Third Party Dependencies -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <!-- 
  <build>
    <plugins>
      <plugin>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>PullInDeps</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>pullInDeps</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-mod-to-target</id>
            <phase>process-classes</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <overwrite>true</overwrite>
              <outputDirectory>${mods.directory}/${module.name}</outputDirectory>
              <resources>
                <resource>
                  <directory>target/classes</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-mod-dependencies-to-target</id>
            <phase>prepare-classes</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${mods.directory}/${module.name}/lib</outputDirectory>
              <includeScope>runtime</includeScope>
            </configuration>
          </execution>
          <execution>
            <id>copy-mod-dependencies-to-target-dependencies</id>
            <phase>prepare-classes</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>target/dependencies</outputDirectory>
              <includeScope>runtime</includeScope>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-test-report</id>
            <phase>test</phase>
            <goals>
              <goal>report-only</goal>
            </goals>
          </execution>
          <execution>
            <id>generate-integration-test-report</id>
            <phase>integration-test</phase>
            <goals>
              <goal>failsafe-report-only</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
              <name>vertx.mods</name>
              <value>${mods.directory}</value>
            </property>
          </systemProperties>
          <includes>
            <include>**/integration/**/*Test*</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/mod.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>assemble</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
   -->
</project>
